// { dg-additional-options "-w" } #[lang = "sized"] pub trait Sized {} struct Foo(T); impl Foo { fn new(a: T, b: Y) -> Self { Self(a) } } struct Bar(T); impl Bar { fn baz(self) {} fn test() -> i32 { 123 } } struct Baz(A, B); impl Baz { fn test(a: X) -> X { a } } pub fn main() { let a = Foo::::new::(123, 456f32); let b = Foo::new::(123, 456f32); let c = Bar::(123); let d = Bar::baz(c); let e = Bar::test(); let f = Baz::test::(true); }