3 struct Misc<T:?Sized>(T);
5 fn check<T: Iterator, U: ?Sized>() {
6 // suggest a where-clause, if needed
8 //~^ ERROR the size for values of type
10 mem::size_of::<Misc<U>>();
11 //~^ ERROR the size for values of type
13 // ... even if T occurs as a type parameter
15 <u64 as From<T>>::from;
16 //~^ ERROR `u64: From<T>` is not satisfied
18 <u64 as From<<T as Iterator>::Item>>::from;
19 //~^ ERROR `u64: From<<T as Iterator>::Item>` is not satisfied
21 // ... but not if there are inference variables
23 <Misc<_> as From<T>>::from;
24 //~^ ERROR `Misc<_>: From<T>` is not satisfied
26 // ... and also not if the error is not related to the type
28 mem::size_of::<[T]>();
29 //~^ ERROR the size for values of type
31 mem::size_of::<[&U]>();
32 //~^ ERROR the size for values of type