@@ -38,28 +38,36 @@ LL | fn f() where T: ?Sized {}
3838 |
3939 = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
4040
41+ error: this relaxed bound is not permitted here
42+ --> $DIR/relaxed-bounds-invalid-places.rs:27:41
43+ |
44+ LL | struct S6<T>(T) where T: Iterator<Item: ?Sized>;
45+ | ^^^^^^
46+ |
47+ = note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
48+
4149error: relaxed bounds are not permitted in supertrait bounds
42- --> $DIR/relaxed-bounds-invalid-places.rs:25 :11
50+ --> $DIR/relaxed-bounds-invalid-places.rs:29 :11
4351 |
4452LL | trait Tr: ?Sized {}
4553 | ^^^^^^
4654 |
4755 = note: traits are `?Sized` by default
4856
4957error: relaxed bounds are not permitted in trait object types
50- --> $DIR/relaxed-bounds-invalid-places.rs:29 :20
58+ --> $DIR/relaxed-bounds-invalid-places.rs:33 :20
5159 |
5260LL | type O1 = dyn Tr + ?Sized;
5361 | ^^^^^^
5462
5563error: relaxed bounds are not permitted in trait object types
56- --> $DIR/relaxed-bounds-invalid-places.rs:30 :15
64+ --> $DIR/relaxed-bounds-invalid-places.rs:34 :15
5765 |
5866LL | type O2 = dyn ?Sized + ?Sized + Tr;
5967 | ^^^^^^
6068
6169error: relaxed bounds are not permitted in trait object types
62- --> $DIR/relaxed-bounds-invalid-places.rs:30 :24
70+ --> $DIR/relaxed-bounds-invalid-places.rs:34 :24
6371 |
6472LL | type O2 = dyn ?Sized + ?Sized + Tr;
6573 | ^^^^^^
@@ -76,5 +84,5 @@ error: bound modifier `?` can only be applied to `Sized`
7684LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
7785 | ^^^^^^^^^^^^^^^
7886
79- error: aborting due to 11 previous errors
87+ error: aborting due to 12 previous errors
8088
0 commit comments