]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/hrtb-debruijn-object-types-in-closures.rs
Rollup merge of #106805 - madsravn:master, r=compiler-errors
[rust.git] / tests / ui / higher-rank-trait-bounds / hrtb-debruijn-object-types-in-closures.rs
1 // run-pass
2 #![allow(dead_code)]
3 // pretty-expanded FIXME #23616
4
5 trait Typer<'tcx> {
6     fn method(&self, data: &'tcx isize) -> &'tcx isize { data }
7     fn dummy(&self) { }
8 }
9
10 fn g<F>(_: F) where F: FnOnce(&dyn Typer) {}
11
12 fn h() {
13     g(|typer| typer.dummy())
14 }
15
16 fn main() { }