wip tests do pass, MutexStruct based

This commit is contained in:
Per Lindgren 2021-11-03 20:58:21 +01:00
parent 20602bd77c
commit b138cc1631
8 changed files with 76 additions and 40 deletions

View file

@ -4,5 +4,5 @@ error: lifetime may not live long enough
20 | let _ = c.shared.lock(|s| s); // lifetime
| -- ^ returning this value requires that `'1` must outlive `'2`
| ||
| |return type of closure is &'2 mut __rtic_internal_fooShared
| has type `&'1 mut __rtic_internal_fooShared`
| |return type of closure is &'2 mut __rtic_internal_fooShared<'_>
| has type `&'1 mut __rtic_internal_fooShared<'_>`

View file

@ -1,9 +1,4 @@
//! examples/lockall_soundness.rs
#![deny(unsafe_code)]
#![deny(warnings)]
#![no_main]
#![no_std]
use panic_semihosting as _;

View file

@ -1,9 +1,9 @@
error: lifetime may not live long enough
--> ui/lockall_lifetime_destruct_field.rs:28:13
--> ui/lockall_lifetime_destruct_field.rs:23:13
|
27 | let _ = c.shared.lock(|foo::Shared { a }| {
22 | let _ = c.shared.lock(|foo::Shared { a }| {
| ------------------ return type of closure is &'2 mut &mut u32
| |
| has type `&'1 mut __rtic_internal_fooShared`
28 | a // lifetime
| has type `&'1 mut __rtic_internal_fooShared<'_>`
23 | a // lifetime
| ^ returning this value requires that `'1` must outlive `'2`

View file

@ -5,4 +5,4 @@ error: lifetime may not live long enough
| -- ^^^^^^^^^ returning this value requires that `'1` must outlive `'2`
| ||
| |return type of closure is &'2 mut u32
| has type `&'1 mut __rtic_internal_fooShared`
| has type `&'1 mut __rtic_internal_fooShared<'_>`