mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
13 lines
390 B
Plaintext
13 lines
390 B
Plaintext
error: lifetime may not live long enough
|
|
--> $DIR/issue-52742.rs:12:9
|
|
|
|
|
LL | fn take_bar(&mut self, b: Bar<'_>) {
|
|
| --------- - has type `Bar<'1>`
|
|
| |
|
|
| has type `&mut Foo<'_, '2>`
|
|
LL | self.y = b.z
|
|
| ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`
|
|
|
|
error: aborting due to 1 previous error
|
|
|