fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
704 B23 linesraw
1error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2  --> $DIR/issue-52742.rs:14:18
3   |
4LL |         self.y = b.z
5   |                  ^^^
6   |
7note: ...the reference is valid for the lifetime `'_` as defined on the impl at 12:10...
8  --> $DIR/issue-52742.rs:12:10
9   |
10LL | impl Foo<'_, '_> {
11   |          ^^
12note: ...but the borrowed content is only valid for the anonymous lifetime #2 defined on the method body at 13:5
13  --> $DIR/issue-52742.rs:13:5
14   |
15LL | /     fn take_bar(&mut self, b: Bar<'_>) {
16LL | |         self.y = b.z
17LL | |
18LL | |     }
19   | |_____^
20
21error: aborting due to previous error
22
23For more information about this error, try `rustc --explain E0312`.