]> git.lizzy.rs Git - rust.git/blob - tests/ui/dyn-keyword/dyn-2018-edition-lint.stderr
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / dyn-keyword / dyn-2018-edition-lint.stderr
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    |                 ^^^^^^^^^
6    |
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
11    |
12 LL | #[deny(bare_trait_objects)]
13    |        ^^^^^^^^^^^^^^^^^^
14 help: use `dyn`
15    |
16 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
17    |                 +++
18
19 error: trait objects without an explicit `dyn` are deprecated
20   --> $DIR/dyn-2018-edition-lint.rs:4:35
21    |
22 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
23    |                                   ^^^^^^^^^
24    |
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>
27 help: use `dyn`
28    |
29 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
30    |                                   +++
31
32 error: trait objects without an explicit `dyn` are deprecated
33   --> $DIR/dyn-2018-edition-lint.rs:17:14
34    |
35 LL |     let _x: &SomeTrait = todo!();
36    |              ^^^^^^^^^
37    |
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>
40 help: use `dyn`
41    |
42 LL |     let _x: &dyn SomeTrait = todo!();
43    |              +++
44
45 error: trait objects without an explicit `dyn` are deprecated
46   --> $DIR/dyn-2018-edition-lint.rs:4:17
47    |
48 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
49    |                 ^^^^^^^^^
50    |
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>
53 help: use `dyn`
54    |
55 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
56    |                 +++
57
58 error: trait objects without an explicit `dyn` are deprecated
59   --> $DIR/dyn-2018-edition-lint.rs:4:17
60    |
61 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
62    |                 ^^^^^^^^^
63    |
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>
66 help: use `dyn`
67    |
68 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
69    |                 +++
70
71 error: trait objects without an explicit `dyn` are deprecated
72   --> $DIR/dyn-2018-edition-lint.rs:4:35
73    |
74 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
75    |                                   ^^^^^^^^^
76    |
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>
79 help: use `dyn`
80    |
81 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
82    |                                   +++
83
84 error: trait objects without an explicit `dyn` are deprecated
85   --> $DIR/dyn-2018-edition-lint.rs:4:35
86    |
87 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
88    |                                   ^^^^^^^^^
89    |
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>
92 help: use `dyn`
93    |
94 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
95    |                                   +++
96
97 error: aborting due to 7 previous errors
98