summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-debruijn-of-object.rs
blob: 0b5510489fb45a9b4b7beedab337e80cc4abc170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(non_camel_case_types)]

// pretty-expanded FIXME #23616

struct ctxt<'tcx> {
    x: &'tcx i32
}

trait AstConv<'tcx> {
    fn tcx<'a>(&'a self) -> &'a ctxt<'tcx>;
}

fn foo(conv: &dyn AstConv) { }

fn bar<'tcx>(conv: &dyn AstConv<'tcx>) {
    foo(conv)
}

fn main() { }