diff options
Diffstat (limited to 'src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr')
-rw-r--r-- | src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr b/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr new file mode 100644 index 000000000..9e212c77d --- /dev/null +++ b/src/test/ui/dyn-keyword/dyn-2021-edition-error.stderr @@ -0,0 +1,27 @@ +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: &SomeTrait, y: Box<SomeTrait>) { +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<SomeTrait>) { +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`. |