|
1 | 1 | error: this relaxed bound is not permitted here |
2 | | - --> $DIR/relaxed-bounds-invalid-places.rs:6:28 |
3 | | - | |
4 | | -LL | struct S1<T>(T) where (T): ?Sized; |
5 | | - | ^^^^^^ |
6 | | - | |
7 | | - = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
8 | | - |
9 | | -error: this relaxed bound is not permitted here |
10 | | - --> $DIR/relaxed-bounds-invalid-places.rs:8:27 |
| 2 | + --> $DIR/relaxed-bounds-invalid-places.rs:10:27 |
11 | 3 | | |
12 | 4 | LL | struct S2<T>(T) where u8: ?Sized; |
13 | 5 | | ^^^^^^ |
14 | 6 | | |
15 | 7 | = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
16 | 8 |
|
17 | 9 | error: this relaxed bound is not permitted here |
18 | | - --> $DIR/relaxed-bounds-invalid-places.rs:10:35 |
| 10 | + --> $DIR/relaxed-bounds-invalid-places.rs:12:35 |
19 | 11 | | |
20 | 12 | LL | struct S3<T>(T) where &'static T: ?Sized; |
21 | 13 | | ^^^^^^ |
22 | 14 | | |
23 | 15 | = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
24 | 16 |
|
25 | 17 | error: this relaxed bound is not permitted here |
26 | | - --> $DIR/relaxed-bounds-invalid-places.rs:14:34 |
| 18 | + --> $DIR/relaxed-bounds-invalid-places.rs:16:34 |
27 | 19 | | |
28 | 20 | LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>; |
29 | 21 | | ^^^^^^^^^^ |
30 | 22 | | |
31 | 23 | = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
32 | 24 |
|
33 | 25 | error: this relaxed bound is not permitted here |
34 | | - --> $DIR/relaxed-bounds-invalid-places.rs:22:21 |
| 26 | + --> $DIR/relaxed-bounds-invalid-places.rs:24:21 |
35 | 27 | | |
36 | 28 | LL | fn f() where T: ?Sized {} |
37 | 29 | | ^^^^^^ |
38 | 30 | | |
39 | 31 | = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
40 | 32 |
|
41 | 33 | error: this relaxed bound is not permitted here |
42 | | - --> $DIR/relaxed-bounds-invalid-places.rs:27:41 |
| 34 | + --> $DIR/relaxed-bounds-invalid-places.rs:29:41 |
43 | 35 | | |
44 | 36 | LL | struct S6<T>(T) where T: Iterator<Item: ?Sized>; |
45 | 37 | | ^^^^^^ |
46 | 38 | | |
47 | 39 | = note: in this context, relaxed bounds are only allowed on type parameters defined on the closest item |
48 | 40 |
|
49 | 41 | error: relaxed bounds are not permitted in supertrait bounds |
50 | | - --> $DIR/relaxed-bounds-invalid-places.rs:29:11 |
| 42 | + --> $DIR/relaxed-bounds-invalid-places.rs:31:11 |
51 | 43 | | |
52 | 44 | LL | trait Tr: ?Sized {} |
53 | 45 | | ^^^^^^ |
54 | 46 | | |
55 | 47 | = note: traits are not implicitly bounded by `Sized`, so there is nothing to relax |
56 | 48 |
|
57 | 49 | error: relaxed bounds are not permitted in trait object types |
58 | | - --> $DIR/relaxed-bounds-invalid-places.rs:33:15 |
| 50 | + --> $DIR/relaxed-bounds-invalid-places.rs:35:15 |
59 | 51 | | |
60 | 52 | LL | type O0 = dyn ?Sized; |
61 | 53 | | ^^^^^^ |
62 | 54 | | |
63 | 55 | = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax |
64 | 56 |
|
65 | 57 | error: relaxed bounds are not permitted in trait object types |
66 | | - --> $DIR/relaxed-bounds-invalid-places.rs:36:20 |
| 58 | + --> $DIR/relaxed-bounds-invalid-places.rs:38:20 |
67 | 59 | | |
68 | 60 | LL | type O1 = dyn Tr + ?Sized; |
69 | 61 | | ^^^^^^ |
70 | 62 | | |
71 | 63 | = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax |
72 | 64 |
|
73 | 65 | error: relaxed bounds are not permitted in trait object types |
74 | | - --> $DIR/relaxed-bounds-invalid-places.rs:37:15 |
| 66 | + --> $DIR/relaxed-bounds-invalid-places.rs:39:15 |
75 | 67 | | |
76 | 68 | LL | type O2 = dyn ?Sized + ?Sized + Tr; |
77 | 69 | | ^^^^^^ |
78 | 70 | | |
79 | 71 | = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax |
80 | 72 |
|
81 | 73 | error: relaxed bounds are not permitted in trait object types |
82 | | - --> $DIR/relaxed-bounds-invalid-places.rs:37:24 |
| 74 | + --> $DIR/relaxed-bounds-invalid-places.rs:39:24 |
83 | 75 | | |
84 | 76 | LL | type O2 = dyn ?Sized + ?Sized + Tr; |
85 | 77 | | ^^^^^^ |
86 | 78 | | |
87 | 79 | = note: trait object types are not implicitly bounded by `Sized`, so there is nothing to relax |
88 | 80 |
|
89 | 81 | error: bound modifier `?` can only be applied to `Sized` |
90 | | - --> $DIR/relaxed-bounds-invalid-places.rs:14:34 |
| 82 | + --> $DIR/relaxed-bounds-invalid-places.rs:16:34 |
91 | 83 | | |
92 | 84 | LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>; |
93 | 85 | | ^^^^^^^^^^ |
94 | 86 |
|
95 | 87 | error: bound modifier `?` can only be applied to `Sized` |
96 | | - --> $DIR/relaxed-bounds-invalid-places.rs:18:33 |
| 88 | + --> $DIR/relaxed-bounds-invalid-places.rs:20:33 |
97 | 89 | | |
98 | 90 | LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized; |
99 | 91 | | ^^^^^^^^^^^^^^^ |
100 | 92 |
|
101 | 93 | error[E0224]: at least one trait is required for an object type |
102 | | - --> $DIR/relaxed-bounds-invalid-places.rs:33:11 |
| 94 | + --> $DIR/relaxed-bounds-invalid-places.rs:35:11 |
103 | 95 | | |
104 | 96 | LL | type O0 = dyn ?Sized; |
105 | 97 | | ^^^^^^^^^^ |
106 | 98 |
|
107 | | -error: aborting due to 14 previous errors |
| 99 | +error: aborting due to 13 previous errors |
108 | 100 |
|
109 | 101 | For more information about this error, try `rustc --explain E0224`. |
0 commit comments