summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/generic-with-implicit-hrtb-without-dyn.rs
blob: 856dc7a3f5a22ab324207f46a223e856d0730d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// revisions: edition2015 edition2021
//[edition2021]edition:2021

#![allow(warnings)]

fn ice() -> impl AsRef<Fn(&())> {
    //~^ ERROR: the trait bound `(): AsRef<(dyn for<'r> Fn(&'r ()) + 'static)>` is not satisfied [E0277]
    //[edition2021]~| ERROR: trait objects must include the `dyn` keyword [E0782]
    todo!()
}

fn main() {}