|
1 | 1 | error: `?Trait` is not permitted in trait object types |
2 | | - --> $DIR/trait-object-trait-parens.rs:6:25 |
| 2 | + --> $DIR/trait-object-trait-parens.rs:8:24 |
3 | 3 | | |
4 | | -LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>; |
5 | | - | ^^^^^^^^ |
| 4 | +LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; |
| 5 | + | ^^^^^^^^ |
6 | 6 |
|
7 | 7 | error: `?Trait` is not permitted in trait object types |
8 | | - --> $DIR/trait-object-trait-parens.rs:11:47 |
| 8 | + --> $DIR/trait-object-trait-parens.rs:12:17 |
9 | 9 | | |
10 | | -LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>; |
11 | | - | ^^^^^^^^ |
| 10 | +LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>; |
| 11 | + | ^^^^^^ |
| 12 | + |
| 13 | +error: `?Trait` is not permitted in trait object types |
| 14 | + --> $DIR/trait-object-trait-parens.rs:16:46 |
| 15 | + | |
| 16 | +LL | let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>; |
| 17 | + | ^^^^^^^^ |
12 | 18 |
|
13 | 19 | warning: trait objects without an explicit `dyn` are deprecated |
14 | | - --> $DIR/trait-object-trait-parens.rs:6:16 |
| 20 | + --> $DIR/trait-object-trait-parens.rs:8:16 |
15 | 21 | | |
16 | | -LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>; |
17 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Copy) + (?Sized) + (for<'a> Trait<'a>)` |
| 22 | +LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; |
| 23 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Obj) + (?Sized) + (for<'a> Trait<'a>)` |
18 | 24 | | |
19 | 25 | = note: `#[warn(bare_trait_objects)]` on by default |
20 | 26 |
|
21 | 27 | warning: trait objects without an explicit `dyn` are deprecated |
22 | | - --> $DIR/trait-object-trait-parens.rs:9:16 |
| 28 | + --> $DIR/trait-object-trait-parens.rs:12:16 |
23 | 29 | | |
24 | | -LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>; |
25 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Copy)` |
| 30 | +LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>; |
| 31 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Obj)` |
26 | 32 |
|
27 | 33 | warning: trait objects without an explicit `dyn` are deprecated |
28 | | - --> $DIR/trait-object-trait-parens.rs:11:16 |
| 34 | + --> $DIR/trait-object-trait-parens.rs:16:16 |
| 35 | + | |
| 36 | +LL | let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>; |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Obj) + (?Sized)` |
| 38 | + |
| 39 | +error[E0225]: only auto traits can be used as additional traits in a trait object |
| 40 | + --> $DIR/trait-object-trait-parens.rs:8:35 |
| 41 | + | |
| 42 | +LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; |
| 43 | + | ----- ^^^^^^^^^^^^^^^^^^^ |
| 44 | + | | | |
| 45 | + | | additional non-auto trait |
| 46 | + | | trait alias used in trait object type (additional use) |
| 47 | + | first non-auto trait |
| 48 | + | trait alias used in trait object type (first use) |
| 49 | + |
| 50 | +error[E0225]: only auto traits can be used as additional traits in a trait object |
| 51 | + --> $DIR/trait-object-trait-parens.rs:12:49 |
29 | 52 | | |
30 | | -LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>; |
31 | | - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Copy) + (?Sized)` |
| 53 | +LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Obj)>; |
| 54 | + | ------------------- ^^^^^ |
| 55 | + | | | |
| 56 | + | | additional non-auto trait |
| 57 | + | | trait alias used in trait object type (additional use) |
| 58 | + | first non-auto trait |
| 59 | + | trait alias used in trait object type (first use) |
32 | 60 |
|
33 | | -error[E0261]: use of undeclared lifetime name `'a` |
34 | | - --> $DIR/trait-object-trait-parens.rs:11:31 |
| 61 | +error[E0225]: only auto traits can be used as additional traits in a trait object |
| 62 | + --> $DIR/trait-object-trait-parens.rs:16:38 |
35 | 63 | | |
36 | | -LL | fn main() { |
37 | | - | - help: consider introducing lifetime `'a` here: `<'a>` |
38 | | -... |
39 | | -LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>; |
40 | | - | ^^ undeclared lifetime |
| 64 | +LL | let _: Box<(for<'a> Trait<'a>) + (Obj) + (?Sized)>; |
| 65 | + | ----------------- ^^^^^ |
| 66 | + | | | |
| 67 | + | | additional non-auto trait |
| 68 | + | | trait alias used in trait object type (additional use) |
| 69 | + | first non-auto trait |
| 70 | + | trait alias used in trait object type (first use) |
41 | 71 |
|
42 | | -error: aborting due to 3 previous errors |
| 72 | +error: aborting due to 6 previous errors |
43 | 73 |
|
44 | | -For more information about this error, try `rustc --explain E0261`. |
| 74 | +For more information about this error, try `rustc --explain E0225`. |
0 commit comments