mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
error: trait objects without an explicit `dyn` are deprecated
|
|
--> $DIR/issue-61963.rs:22:14
|
|
|
|
|
LL | bar: Box<Bar>,
|
|
| ^^^
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
|
note: the lint level is defined here
|
|
--> $DIR/issue-61963.rs:3:9
|
|
|
|
|
LL | #![deny(bare_trait_objects)]
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
help: if this is an object-safe trait, use `dyn`
|
|
|
|
|
LL | bar: Box<dyn Bar>,
|
|
| +++
|
|
|
|
error: trait objects without an explicit `dyn` are deprecated
|
|
--> $DIR/issue-61963.rs:18:1
|
|
|
|
|
LL | pub struct Foo {
|
|
| ^^^
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
|
help: if this is an object-safe trait, use `dyn`
|
|
|
|
|
LL | dyn pub struct Foo {
|
|
| +++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|