1 error: trait objects without an explicit `dyn` are deprecated
2 --> $DIR/dyn-2018-edition-lint.rs:4:17
4 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
7 note: the lint level is defined here
8 --> $DIR/dyn-2018-edition-lint.rs:2:8
10 LL | #[deny(bare_trait_objects)]
12 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
13 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
16 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
17 LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
20 error: trait objects without an explicit `dyn` are deprecated
21 --> $DIR/dyn-2018-edition-lint.rs:4:35
23 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
26 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
27 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
30 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
31 LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
34 error: trait objects without an explicit `dyn` are deprecated
35 --> $DIR/dyn-2018-edition-lint.rs:17:14
37 LL | let _x: &SomeTrait = todo!();
40 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
41 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
44 LL - let _x: &SomeTrait = todo!();
45 LL + let _x: &dyn SomeTrait = todo!();
48 error: trait objects without an explicit `dyn` are deprecated
49 --> $DIR/dyn-2018-edition-lint.rs:4:17
51 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
54 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
55 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
58 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
59 LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
62 error: trait objects without an explicit `dyn` are deprecated
63 --> $DIR/dyn-2018-edition-lint.rs:4:17
65 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
68 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
69 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
72 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
73 LL + fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
76 error: trait objects without an explicit `dyn` are deprecated
77 --> $DIR/dyn-2018-edition-lint.rs:4:35
79 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
82 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
83 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
86 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
87 LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
90 error: trait objects without an explicit `dyn` are deprecated
91 --> $DIR/dyn-2018-edition-lint.rs:4:35
93 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
96 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
97 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
100 LL - fn function(x: &SomeTrait, y: Box<SomeTrait>) {
101 LL + fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
104 error: aborting due to 7 previous errors