]> git.lizzy.rs Git - rust.git/blob - tests/ui/dyn-keyword/dyn-2021-edition-error.stderr
Rollup merge of #107615 - notriddle:notriddle/nbsp, r=GuillaumeGomez
[rust.git] / tests / ui / dyn-keyword / dyn-2021-edition-error.stderr
1 error[E0782]: trait objects must include the `dyn` keyword
2   --> $DIR/dyn-2021-edition-error.rs:3:17
3    |
4 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
5    |                 ^^^^^^^^^
6    |
7 help: add `dyn` keyword before this trait
8    |
9 LL | fn function(x: &dyn SomeTrait, y: Box<SomeTrait>) {
10    |                 +++
11
12 error[E0782]: trait objects must include the `dyn` keyword
13   --> $DIR/dyn-2021-edition-error.rs:3:35
14    |
15 LL | fn function(x: &SomeTrait, y: Box<SomeTrait>) {
16    |                                   ^^^^^^^^^
17    |
18 help: add `dyn` keyword before this trait
19    |
20 LL | fn function(x: &SomeTrait, y: Box<dyn SomeTrait>) {
21    |                                   +++
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0782`.