2024-10-04 16:10:28 +02:00
|
|
|
error[E0782]: expected a type, found a trait
|
2022-09-05 21:58:12 -03:00
|
|
|
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
|
|
|
|
|
|
|
|
|
LL | fn ice() -> impl AsRef<Fn(&())> {
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2024-10-04 16:10:28 +02:00
|
|
|
help: you can add the `dyn` keyword if you want a trait object
|
2022-09-05 21:58:12 -03:00
|
|
|
|
|
2022-09-11 19:19:07 +00:00
|
|
|
LL | fn ice() -> impl AsRef<dyn Fn(&())> {
|
|
|
|
| +++
|
2022-09-05 21:58:12 -03:00
|
|
|
|
2025-01-11 19:22:02 +00:00
|
|
|
error[E0782]: expected a type, found a trait
|
|
|
|
--> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
|
|
|
|
|
|
|
|
|
LL | fn ice() -> impl AsRef<Fn(&())> {
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
help: you can add the `dyn` keyword if you want a trait object
|
|
|
|
|
|
|
|
|
LL | fn ice() -> impl AsRef<dyn Fn(&())> {
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2022-09-05 21:58:12 -03:00
|
|
|
|
2024-10-04 16:10:28 +02:00
|
|
|
For more information about this error, try `rustc --explain E0782`.
|