1 error: lifetime may not live long enough
2 --> $DIR/match-ref-mut-invariance.rs:10:9
5 | -- lifetime `'b` defined here
6 LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
7 | -- lifetime `'a` defined here
8 LL | match self.0 { ref mut x => x }
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
11 = help: consider adding the following bound: `'a: 'b`
12 = note: requirement occurs because of a mutable reference to `&i32`
13 = note: mutable references are invariant over their type parameter
14 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
16 error: aborting due to previous error