summaryrefslogtreecommitdiffstats
path: root/src/test/ui/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs
blob: 8431226a3ece1205a9dad2c9c292db413bad4751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
#![allow(dead_code)]
// pretty-expanded FIXME #23616

trait Typer<'tcx> {
    fn method(&self, data: &'tcx isize) -> &'tcx isize { data }
    fn dummy(&self) { }
}

fn g<F>(_: F) where F: FnOnce(&dyn Typer) {}

fn h() {
    g(|typer| typer.dummy())
}

fn main() { }