1 // Regression test for issue #67007
2 // Ensures that we show information about the specific regions involved
4 // Covariant over 'a, invariant over 'tcx
5 struct FnCtxt<'a, 'tcx: 'a>(&'a (), *mut &'tcx ());
7 impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
8 fn use_it(&self, _: &'tcx ()) {}
11 struct Consumer<'tcx>(&'tcx ());
13 impl<'tcx> Consumer<'tcx> {
14 fn bad_method<'a>(&self, fcx: &FnCtxt<'a, 'tcx>) {
15 let other = self.use_fcx(fcx); //~ ERROR lifetime may not live long enough
19 fn use_fcx<'a>(&self, _: &FnCtxt<'a, 'tcx>) -> &'a () {