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 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
8 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
9 note: the lint level is defined here
10 --> $DIR/dyn-2018-edition-lint.rs:2:8
12 LL | #[deny(bare_trait_objects)]
16 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
19 error: trait objects without an explicit `dyn` are deprecated
20 --> $DIR/dyn-2018-edition-lint.rs:4:35
22 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
25 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
26 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
29 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
32 error: trait objects without an explicit `dyn` are deprecated
33 --> $DIR/dyn-2018-edition-lint.rs:17:14
35 LL | let _x: &SomeTrait = todo!();
38 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
39 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
42 LL | let _x: &dyn SomeTrait = todo!();
45 error: trait objects without an explicit `dyn` are deprecated
46 --> $DIR/dyn-2018-edition-lint.rs:4:17
48 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
51 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
52 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
55 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
58 error: trait objects without an explicit `dyn` are deprecated
59 --> $DIR/dyn-2018-edition-lint.rs:4:17
61 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
64 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
65 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
68 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
71 error: trait objects without an explicit `dyn` are deprecated
72 --> $DIR/dyn-2018-edition-lint.rs:4:35
74 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
77 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
78 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
81 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
84 error: trait objects without an explicit `dyn` are deprecated
85 --> $DIR/dyn-2018-edition-lint.rs:4:35
87 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
90 = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
91 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
94 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
97 error: aborting due to 7 previous errors