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