mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
26 lines
796 B
Plaintext
26 lines
796 B
Plaintext
error[E0782]: trait objects must include the `dyn` keyword
|
|
--> $DIR/dyn-2021-edition-error.rs:3:17
|
|
|
|
|
LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
|
| ^^^^^^^^^
|
|
|
|
|
help: add `dyn` keyword before this trait
|
|
|
|
|
LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
|
|
| +++
|
|
|
|
error[E0782]: trait objects must include the `dyn` keyword
|
|
--> $DIR/dyn-2021-edition-error.rs:3:35
|
|
|
|
|
LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
|
|
| ^^^^^^^^^
|
|
|
|
|
help: add `dyn` keyword before this trait
|
|
|
|
|
LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
|
|
| +++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0782`.
|