fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.7 KiB41 linesraw
1error: `?Trait` is not permitted in trait object types
2  --> $DIR/trait-object-trait-parens.rs:6:25
3   |
4LL |     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
5   |                         ^^^^^^^^
6
7error: `?Trait` is not permitted in trait object types
8  --> $DIR/trait-object-trait-parens.rs:11:47
9   |
10LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
11   |                                               ^^^^^^^^
12
13warning: trait objects without an explicit `dyn` are deprecated
14  --> $DIR/trait-object-trait-parens.rs:6:16
15   |
16LL |     let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
17   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Copy) + (?Sized) + (for<'a> Trait<'a>)`
18   |
19   = note: `#[warn(bare_trait_objects)]` on by default
20
21warning: trait objects without an explicit `dyn` are deprecated
22  --> $DIR/trait-object-trait-parens.rs:9:16
23   |
24LL |     let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
25   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Copy)`
26
27warning: trait objects without an explicit `dyn` are deprecated
28  --> $DIR/trait-object-trait-parens.rs:11:16
29   |
30LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
31   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Copy) + (?Sized)`
32
33error[E0261]: use of undeclared lifetime name `'a`
34  --> $DIR/trait-object-trait-parens.rs:11:31
35   |
36LL |     let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
37   |                               ^^ undeclared lifetime
38
39error: aborting due to 3 previous errors
40
41For more information about this error, try `rustc --explain E0261`.