rtic/ui/lockall_lifetime_destruct_field.stderr

10 lines
482 B
Text
Raw Permalink Normal View History

2021-10-26 19:35:41 +02:00
error: lifetime may not live long enough
2021-11-03 20:58:21 +01:00
--> ui/lockall_lifetime_destruct_field.rs:23:13
2021-10-26 19:35:41 +02:00
|
2021-11-03 20:58:21 +01:00
22 | let _ = c.shared.lock(|foo::Shared { a }| {
2021-10-26 19:35:41 +02:00
| ------------------ return type of closure is &'2 mut &mut u32
| |
2021-11-03 20:58:21 +01:00
| has type `&'1 mut __rtic_internal_fooShared<'_>`
23 | a // lifetime
2021-10-26 19:35:41 +02:00
| ^ returning this value requires that `'1` must outlive `'2`