|
| 1 | +error: trait objects without an explicit `dyn` are deprecated |
| 2 | + --> $DIR/dyn-2018-edition-lint.rs:4:17 |
| 3 | + | |
| 4 | +LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) { |
| 5 | + | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` |
| 6 | + | |
| 7 | +note: the lint level is defined here |
| 8 | + --> $DIR/dyn-2018-edition-lint.rs:2:8 |
| 9 | + | |
| 10 | +LL | #[deny(bare_trait_objects)] |
| 11 | + | ^^^^^^^^^^^^^^^^^^ |
| 12 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! |
| 13 | + = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165> |
| 14 | + |
| 15 | +error: trait objects without an explicit `dyn` are deprecated |
| 16 | + --> $DIR/dyn-2018-edition-lint.rs:4:35 |
| 17 | + | |
| 18 | +LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) { |
| 19 | + | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` |
| 20 | + | |
| 21 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! |
| 22 | + = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165> |
| 23 | + |
| 24 | +error: trait objects without an explicit `dyn` are deprecated |
| 25 | + --> $DIR/dyn-2018-edition-lint.rs:9:14 |
| 26 | + | |
| 27 | +LL | let _x: &SomeTrait = todo!(); |
| 28 | + | ^^^^^^^^^ help: use `dyn`: `dyn SomeTrait` |
| 29 | + | |
| 30 | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition! |
| 31 | + = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165> |
| 32 | + |
| 33 | +error: aborting due to 3 previous errors |
| 34 | + |
0 commit comments