1 error[E0782]: trait objects must include the `dyn` keyword
2 --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
4 LL | fn ice() -> impl AsRef<Fn(&())> {
7 help: add `dyn` keyword before this trait
9 LL | fn ice() -> impl AsRef<dyn Fn(&())> {
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
15 LL | fn ice() -> impl AsRef<Fn(&())> {
16 | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()`
18 error: aborting due to 2 previous errors
20 Some errors have detailed explanations: E0277, E0782.
21 For more information about an error, try `rustc --explain E0277`.