aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cortex-m-rt/tests/compile-fail/non-static-resource.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cortex-m-rt/tests/compile-fail/non-static-resource.rs b/cortex-m-rt/tests/compile-fail/non-static-resource.rs
index 970bbae..a603728 100644
--- a/cortex-m-rt/tests/compile-fail/non-static-resource.rs
+++ b/cortex-m-rt/tests/compile-fail/non-static-resource.rs
@@ -20,14 +20,16 @@ enum interrupt {
fn SVCall() {
static mut STAT: u8 = 0;
- let _stat: &'static mut u8 = STAT; //~ ERROR explicit lifetime required in the type of `STAT`
+ let _stat: &'static mut u8 = STAT;
+ //~^ ERROR lifetime of reference outlives lifetime of borrowed content
}
#[interrupt]
fn UART0() {
static mut STAT: u8 = 0;
- let _stat: &'static mut u8 = STAT; //~ ERROR explicit lifetime required in the type of `STAT`
+ let _stat: &'static mut u8 = STAT;
+ //~^ ERROR lifetime of reference outlives lifetime of borrowed content
}
#[entry]