@@ -16,51 +16,53 @@ fn check<T: Iterator, U: ?Sized>() {
16
16
// suggest a where-clause, if needed
17
17
mem:: size_of :: < U > ( ) ;
18
18
//~^ ERROR `U: std::marker::Sized` is not satisfied
19
- //~| NOTE the trait `std::marker::Sized` is not implemented for `U`
20
19
//~| HELP consider adding a `where U: std::marker::Sized` bound
21
20
//~| NOTE required by `std::mem::size_of`
21
+ //~| NOTE `U` does not have a constant size known at compile-time
22
+ //~| HELP the trait `std::marker::Sized` is not implemented for `U`
22
23
23
24
mem:: size_of :: < Misc < U > > ( ) ;
24
25
//~^ ERROR `U: std::marker::Sized` is not satisfied
25
- //~| NOTE the trait `std::marker::Sized` is not implemented for `U`
26
26
//~| HELP consider adding a `where U: std::marker::Sized` bound
27
27
//~| NOTE required because it appears within the type `Misc<U>`
28
28
//~| NOTE required by `std::mem::size_of`
29
+ //~| NOTE `U` does not have a constant size known at compile-time
30
+ //~| HELP within `Misc<U>`, the trait `std::marker::Sized` is not implemented for `U`
29
31
30
32
// ... even if T occurs as a type parameter
31
33
32
34
<u64 as From < T > >:: from;
33
35
//~^ ERROR `u64: std::convert::From<T>` is not satisfied
34
- //~| NOTE the trait `std::convert::From<T>` is not implemented for `u64`
35
36
//~| HELP consider adding a `where u64: std::convert::From<T>` bound
36
37
//~| NOTE required by `std::convert::From::from`
38
+ //~| NOTE the trait `std::convert::From<T>` is not implemented for `u64`
37
39
38
40
<u64 as From < <T as Iterator >:: Item > >:: from;
39
41
//~^ ERROR `u64: std::convert::From<<T as std::iter::Iterator>::Item>` is not satisfied
40
- //~| NOTE the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented
41
42
//~| HELP consider adding a `where u64:
42
43
//~| NOTE required by `std::convert::From::from`
44
+ //~| NOTE the trait `std::convert::From<<T as std::iter::Iterator>::Item>` is not implemented
43
45
44
46
// ... but not if there are inference variables
45
47
46
48
<Misc < _ > as From < T > >:: from;
47
49
//~^ ERROR `Misc<_>: std::convert::From<T>` is not satisfied
48
- //~| NOTE the trait `std::convert::From<T>` is not implemented for `Misc<_>`
49
50
//~| NOTE required by `std::convert::From::from`
51
+ //~| NOTE the trait `std::convert::From<T>` is not implemented for `Misc<_>`
50
52
51
53
// ... and also not if the error is not related to the type
52
54
53
55
mem:: size_of :: < [ T ] > ( ) ;
54
56
//~^ ERROR `[T]: std::marker::Sized` is not satisfied
55
- //~| NOTE the trait `std::marker::Sized` is not implemented for `[T]`
56
57
//~| NOTE `[T]` does not have a constant size
57
58
//~| NOTE required by `std::mem::size_of`
59
+ //~| HELP the trait `std::marker::Sized` is not implemented for `[T]`
58
60
59
61
mem:: size_of :: < [ & U ] > ( ) ;
60
62
//~^ ERROR `[&U]: std::marker::Sized` is not satisfied
61
- //~| NOTE the trait `std::marker::Sized` is not implemented for `[&U]`
62
63
//~| NOTE `[&U]` does not have a constant size
63
64
//~| NOTE required by `std::mem::size_of`
65
+ //~| HELP the trait `std::marker::Sized` is not implemented for `[&U]`
64
66
}
65
67
66
68
fn main ( ) {
0 commit comments