fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
769 B22 linesraw
1error[E0308]: mismatched types
2  --> $DIR/match-ref-mut-invariance.rs:10:37
3   |
4LL |         match self.0 { ref mut x => x }
5   |                                     ^ lifetime mismatch
6   |
7   = note: expected mutable reference `&'a mut &'a i32`
8              found mutable reference `&'a mut &'b i32`
9note: the lifetime `'a` as defined on the method body at 9:12...
10  --> $DIR/match-ref-mut-invariance.rs:9:12
11   |
12LL |     fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
13   |            ^^
14note: ...does not necessarily outlive the lifetime `'b` as defined on the impl at 8:6
15  --> $DIR/match-ref-mut-invariance.rs:8:6
16   |
17LL | impl<'b> S<'b> {
18   |      ^^
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0308`.