@@ -4,73 +4,79 @@ error: this relaxed bound is not permitted here
44LL | struct S1<T>(T) where (T): ?Sized;
55 | ^^^^^^
66 |
7- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
7+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
88
99error: this relaxed bound is not permitted here
1010 --> $DIR/relaxed-bounds-invalid-places.rs:8:27
1111 |
1212LL | struct S2<T>(T) where u8: ?Sized;
1313 | ^^^^^^
1414 |
15- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
15+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
1616
1717error: this relaxed bound is not permitted here
1818 --> $DIR/relaxed-bounds-invalid-places.rs:10:35
1919 |
2020LL | struct S3<T>(T) where &'static T: ?Sized;
2121 | ^^^^^^
2222 |
23- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
23+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
2424
2525error: this relaxed bound is not permitted here
2626 --> $DIR/relaxed-bounds-invalid-places.rs:14:34
2727 |
2828LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>;
2929 | ^^^^^^^^^^
3030 |
31- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
31+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
3232
3333error: this relaxed bound is not permitted here
3434 --> $DIR/relaxed-bounds-invalid-places.rs:22:21
3535 |
3636LL | fn f() where T: ?Sized {}
3737 | ^^^^^^
3838 |
39- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
39+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
4040
4141error: this relaxed bound is not permitted here
4242 --> $DIR/relaxed-bounds-invalid-places.rs:27:41
4343 |
4444LL | struct S6<T>(T) where T: Iterator<Item: ?Sized>;
4545 | ^^^^^^
4646 |
47- = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
47+ = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item
4848
4949error: relaxed bounds are not permitted in supertrait bounds
5050 --> $DIR/relaxed-bounds-invalid-places.rs:29:11
5151 |
5252LL | trait Tr: ?Sized {}
5353 | ^^^^^^
5454 |
55- = note: traits are `? Sized` by default
55+ = note: traits are not implicitly bounded by ` Sized`, so there is nothing to relax
5656
5757error: relaxed bounds are not permitted in trait object types
5858 --> $DIR/relaxed-bounds-invalid-places.rs:33:20
5959 |
6060LL | type O1 = dyn Tr + ?Sized;
6161 | ^^^^^^
62+ |
63+ = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax
6264
6365error: relaxed bounds are not permitted in trait object types
6466 --> $DIR/relaxed-bounds-invalid-places.rs:34:15
6567 |
6668LL | type O2 = dyn ?Sized + ?Sized + Tr;
6769 | ^^^^^^
70+ |
71+ = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax
6872
6973error: relaxed bounds are not permitted in trait object types
7074 --> $DIR/relaxed-bounds-invalid-places.rs:34:24
7175 |
7276LL | type O2 = dyn ?Sized + ?Sized + Tr;
7377 | ^^^^^^
78+ |
79+ = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax
7480
7581error: bound modifier `?` can only be applied to `Sized`
7682 --> $DIR/relaxed-bounds-invalid-places.rs:14:34
0 commit comments