1 // Regression test for issue #67007
2 // Ensures that we show information about the specific regions involved
6 // Covariant over 'a, invariant over 'tcx
7 struct FnCtxt<'a, 'tcx: 'a>(&'a (), *mut &'tcx ());
9 impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
10 fn use_it(&self, _: &'tcx ()) {}
13 struct Consumer<'tcx>(&'tcx ());
15 impl<'tcx> Consumer<'tcx> {
16 fn bad_method<'a>(&self, fcx: &FnCtxt<'a, 'tcx>) {
17 let other = self.use_fcx(fcx); //~ ERROR borrowed data
21 fn use_fcx<'a>(&self, _: &FnCtxt<'a, 'tcx>) -> &'a () {