]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / impl-trait / generic-with-implicit-hrtb-without-dyn.rs
1 // revisions: edition2015 edition2021
2 //[edition2021]edition:2021
3
4 #![allow(warnings)]
5
6 fn ice() -> impl AsRef<Fn(&())> {
7     //[edition2015]~^ ERROR: the trait bound `(): AsRef<(dyn for<'a> Fn(&'a ()) + 'static)>` is not satisfied [E0277]
8     //[edition2021]~^^ ERROR: trait objects must include the `dyn` keyword [E0782]
9     todo!()
10 }
11
12 fn main() {}