diff options
Diffstat (limited to 'tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr')
-rw-r--r-- | tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr new file mode 100644 index 000000000..30fbba168 --- /dev/null +++ b/tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr @@ -0,0 +1,14 @@ +error[E0782]: trait objects must include the `dyn` keyword + --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24 + | +LL | fn ice() -> impl AsRef<Fn(&())> { + | ^^^^^^^ + | +help: add `dyn` keyword before this trait + | +LL | fn ice() -> impl AsRef<dyn Fn(&())> { + | +++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0782`. |