1 struct S1<T>(T) where (T): ?Sized;
2 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
4 struct S2<T>(T) where u8: ?Sized;
5 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
7 struct S3<T>(T) where &'static T: ?Sized;
8 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
12 struct S4<T>(T) where for<'a> T: ?Trait<'a>;
13 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
15 struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
16 //~^ ERROR type parameter has more than one relaxed default bound
17 //~| WARN default bound relaxed for a type parameter
20 fn f() where T: ?Sized {}
21 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
25 let u = vec![1, 2, 3];
26 let _s: S5<[u8]> = S5(&u[..]); // OK