2 // revisions: verbose normal
4 //[verbose] compile-flags: -Z verbose
6 trait Foo<'b, 'c, S=u32> {
7 fn bar<'a, T>() where T: 'a {}
11 impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}
15 fn foo<'z>() where &'z (): Sized {
16 let x: () = <i8 as Foo<'static, 'static, u8>>::bar::<'static, char>;
17 //[verbose]~^ ERROR mismatched types
18 //[verbose]~| expected unit type `()`
19 //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
20 //[normal]~^^^^ ERROR mismatched types
21 //[normal]~| expected unit type `()`
22 //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
25 let x: () = <i8 as Foo<'static, 'static, u32>>::bar::<'static, char>;
26 //[verbose]~^ ERROR mismatched types
27 //[verbose]~| expected unit type `()`
28 //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic>>::bar::<ReStatic, char>}`
29 //[normal]~^^^^ ERROR mismatched types
30 //[normal]~| expected unit type `()`
31 //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
33 let x: () = <i8 as Foo<'static, 'static, u8>>::baz;
34 //[verbose]~^ ERROR mismatched types
35 //[verbose]~| expected unit type `()`
36 //[verbose]~| found fn item `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
37 //[normal]~^^^^ ERROR mismatched types
38 //[normal]~| expected unit type `()`
39 //[normal]~| found fn item `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
41 let x: () = foo::<'static>;
42 //[verbose]~^ ERROR mismatched types
43 //[verbose]~| expected unit type `()`
44 //[verbose]~| found fn item `fn() {foo::<ReStatic>}`
45 //[normal]~^^^^ ERROR mismatched types
46 //[normal]~| expected unit type `()`
47 //[normal]~| found fn item `fn() {foo::<'static>}`
49 <str as Foo<u8>>::bar;
50 //[verbose]~^ ERROR the size for values of type
51 //[normal]~^^ ERROR the size for values of type