2019-01-06 09:33:05 -06:00
|
|
|
error: `?Trait` is not permitted in trait object types
|
|
|
|
--> $DIR/trait-object-trait-parens.rs:6:25
|
|
|
|
|
|
|
|
|
LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: `?Trait` is not permitted in trait object types
|
2019-05-28 13:45:27 -05:00
|
|
|
--> $DIR/trait-object-trait-parens.rs:11:47
|
2019-01-06 09:33:05 -06:00
|
|
|
|
|
|
|
|
LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
2019-05-28 13:45:27 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/trait-object-trait-parens.rs:6:16
|
|
|
|
|
|
|
|
|
LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (Copy) + (?Sized) + (for<'a> Trait<'a>)`
|
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[warn(bare_trait_objects)]` on by default
|
2019-05-28 13:45:27 -05:00
|
|
|
|
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/trait-object-trait-parens.rs:9:16
|
|
|
|
|
|
|
|
|
LL | let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (?Sized) + (for<'a> Trait<'a>) + (Copy)`
|
|
|
|
|
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/trait-object-trait-parens.rs:11:16
|
|
|
|
|
|
|
|
|
LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn (for<'a> Trait<'a>) + (Copy) + (?Sized)`
|
|
|
|
|
2019-01-06 09:33:05 -06:00
|
|
|
error[E0261]: use of undeclared lifetime name `'a`
|
2019-05-28 13:45:27 -05:00
|
|
|
--> $DIR/trait-object-trait-parens.rs:11:31
|
2019-01-06 09:33:05 -06:00
|
|
|
|
|
2020-01-15 20:34:30 -06:00
|
|
|
LL | fn main() {
|
|
|
|
| - help: consider introducing lifetime `'a` here: `<'a>`
|
|
|
|
...
|
2019-01-06 09:33:05 -06:00
|
|
|
LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
|
|
|
| ^^ undeclared lifetime
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0261`.
|