2023-10-31 13:45:26 +00:00
|
|
|
error[E0277]: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied
|
|
|
|
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:13
|
|
|
|
|
|
|
|
|
LL | fn ice() -> impl AsRef<Fn(&())> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not implemented for `()`
|
|
|
|
|
2022-09-06 00:58:12 +00:00
|
|
|
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
|
|
|
|
|
|
2022-09-11 19:19:07 +00:00
|
|
|
LL | fn ice() -> impl AsRef<dyn Fn(&())> {
|
|
|
|
| +++
|
2022-09-06 00:58:12 +00:00
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2022-09-06 00:58:12 +00:00
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0782.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|