]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.edition2021.stderr
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / generic-with-implicit-hrtb-without-dyn.edition2021.stderr
1 error[E0782]: trait objects must include the `dyn` keyword
2   --> $DIR/generic-with-implicit-hrtb-without-dyn.rs:6:24
3    |
4 LL | fn ice() -> impl AsRef<Fn(&())> {
5    |                        ^^^^^^^
6    |
7 help: add `dyn` keyword before this trait
8    |
9 LL | fn ice() -> impl AsRef<dyn Fn(&())> {
10    |                        +++
11
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
14    |
15 LL | fn ice() -> impl AsRef<Fn(&())> {
16    |             ^^^^^^^^^^^^^^^^^^^ the trait `AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not implemented for `()`
17
18 error: aborting due to 2 previous errors
19
20 Some errors have detailed explanations: E0277, E0782.
21 For more information about an error, try `rustc --explain E0277`.