1 // Regression test for #47470: cached results of projections were
2 // causing region relations not to be enforced at all the places where
3 // they have to be enforced.
5 struct Foo<'a>(&'a ());
8 fn get(self) -> Self::Assoc;
11 impl<'a> Bar for Foo<'a> {
13 fn get(self) -> Self::Assoc {
15 &local //~ ERROR cannot return reference to local variable `local`
20 let f = Foo(&()).get();