]>
Commit | Line | Data |
---|---|---|
064997fb FG |
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 | | | |
f2b60f7d FG |
9 | LL | fn ice() -> impl AsRef<dyn Fn(&())> { |
10 | | +++ | |
064997fb FG |
11 | |
12 | error[E0277]: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied | |
13 | --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13 | |
14 | | | |
15 | LL | fn ice() -> impl AsRef<Fn(&())> { | |
16 | | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()` | |
17 | ||
18 | error: aborting due to 2 previous errors | |
19 | ||
20 | Some errors have detailed explanations: E0277, E0782. | |
21 | For more information about an error, try `rustc --explain E0277`. |