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