fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
503 B14 linesraw
1error: lifetime may not live long enough
2  --> $DIR/match-ref-mut-invariance.rs:10:9
3   |
4LL | impl<'b> S<'b> {
5   |      -- lifetime `'b` defined here
6LL |     fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
7   |            -- lifetime `'a` defined here
8LL |         match self.0 { ref mut x => x }
9   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b`
10   |
11   = help: consider adding the following bound: `'a: 'b`
12
13error: aborting due to previous error
14