aboutsummaryrefslogtreecommitdiff
path: root/tests/cfail/token-outlive.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-18 20:03:22 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-18 20:03:22 -0500
commit97a7e38db7eb0643a6334aba30077622d09e5c85 (patch)
treea561e574a8cb36b748c84f69ee679fe0e61f1899 /tests/cfail/token-outlive.rs
parenta2b0c9e0d077870441ecdea00108c3a3a394fd9b (diff)
downloadrtic-97a7e38db7eb0643a6334aba30077622d09e5c85.tar.gz
rtic-97a7e38db7eb0643a6334aba30077622d09e5c85.tar.zst
rtic-97a7e38db7eb0643a6334aba30077622d09e5c85.zip
tasks / idle have exclusive access to Threshold, but do not own the token
Diffstat (limited to 'tests/cfail/token-outlive.rs')
-rw-r--r--tests/cfail/token-outlive.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cfail/token-outlive.rs b/tests/cfail/token-outlive.rs
index 9bcd2882..93d1c604 100644
--- a/tests/cfail/token-outlive.rs
+++ b/tests/cfail/token-outlive.rs
@@ -38,7 +38,7 @@ fn idle() -> ! {
task!(EXTI0, exti0);
-fn exti0(mut t: Threshold, r: EXTI0::Resources) {
+fn exti0(mut t: &mut Threshold, r: EXTI0::Resources) {
// ERROR token should not outlive the critical section
let t = r.STATE.claim(&mut t, |_state, t| t);
//~^ error cannot infer an appropriate lifetime
@@ -46,4 +46,4 @@ fn exti0(mut t: Threshold, r: EXTI0::Resources) {
task!(EXTI1, exti1);
-fn exti1(_t: Threshold, _r: EXTI1::Resources) {}
+fn exti1(_t: &mut Threshold, _r: EXTI1::Resources) {}