@@ -38,28 +38,36 @@ LL | fn f() where T: ?Sized {}
38
38
|
39
39
= note: in this context, relaxed bounds are only allowed on type parameters defined by the closest item
40
40
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
+
41
49
error: 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
43
51
|
44
52
LL | trait Tr: ?Sized {}
45
53
| ^^^^^^
46
54
|
47
55
= note: traits are `?Sized` by default
48
56
49
57
error: 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
51
59
|
52
60
LL | type O1 = dyn Tr + ?Sized;
53
61
| ^^^^^^
54
62
55
63
error: 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
57
65
|
58
66
LL | type O2 = dyn ?Sized + ?Sized + Tr;
59
67
| ^^^^^^
60
68
61
69
error: 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
63
71
|
64
72
LL | type O2 = dyn ?Sized + ?Sized + Tr;
65
73
| ^^^^^^
@@ -76,5 +84,5 @@ error: bound modifier `?` can only be applied to `Sized`
76
84
LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
77
85
| ^^^^^^^^^^^^^^^
78
86
79
- error: aborting due to 11 previous errors
87
+ error: aborting due to 12 previous errors
80
88
0 commit comments