]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / generic-with-implicit-hrtb-without-dyn.edition2021.stderr
CommitLineData
064997fb
FG
1error[E0782]: trait objects must include the `dyn` keyword
2 --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
3 |
4LL | fn ice() -> impl AsRef<Fn(&())> {
5 | ^^^^^^^
6 |
7help: add `dyn` keyword before this trait
8 |
f2b60f7d
FG
9LL | fn ice() -> impl AsRef<dyn Fn(&())> {
10 | +++
064997fb
FG
11
12error[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 |
15LL | fn ice() -> impl AsRef<Fn(&())> {
16 | ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()`
17
18error: aborting due to 2 previous errors
19
20Some errors have detailed explanations: E0277, E0782.
21For more information about an error, try `rustc --explain E0277`.