]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
Fix #106496, suggest remove deref for type mismatch
[rust.git] / tests / ui / impl-trait / generic-with-implicit-hrtb-without-dyn.edition2021.stderr
1 error[E0782]: trait objects must include the `dyn` keyword
2   --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
3    |
4 LL | fn ice() -> impl AsRef<Fn(&())> {
5    |                        ^^^^^^^
6    |
7 help: add `dyn` keyword before this trait
8    |
9 LL | fn ice() -> impl AsRef<dyn Fn(&())> {
10    |                        +++
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0782`.