1 // In contrast to `region-escape-via-bound-invariant`, in this case we
2 // *can* return a value of type `&'x u32`, even though `'x` does not
3 // appear in the bounds. This is because `&` is contravariant, and so
4 // we are *actually* returning a `&'y u32`.
6 // See https://github.com/rust-lang/rust/issues/46541 for more details.
11 #![feature(in_band_lifetimes)]
14 fn foo(x: &'x u32) -> impl Fn() -> &'y u32