aboutsummaryrefslogtreecommitdiff
path: root/tests/cfail/wrong-threshold.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/wrong-threshold.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/wrong-threshold.rs')
-rw-r--r--tests/cfail/wrong-threshold.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cfail/wrong-threshold.rs b/tests/cfail/wrong-threshold.rs
index af8bb05d..39d3a57b 100644
--- a/tests/cfail/wrong-threshold.rs
+++ b/tests/cfail/wrong-threshold.rs
@@ -39,7 +39,7 @@ fn idle() -> ! {
task!(EXTI0, exti0);
-fn exti0(mut ot: Threshold, r: EXTI0::Resources) {
+fn exti0(mut ot: &mut Threshold, r: EXTI0::Resources) {
r.A.claim(&mut ot, |_a, mut _it| {
//~^ error cannot borrow `ot` as mutable more than once at a time
//~| error cannot borrow `ot` as mutable more than once at a time
@@ -50,4 +50,4 @@ fn exti0(mut ot: Threshold, r: EXTI0::Resources) {
task!(EXTI1, exti1);
-fn exti1(_t: Threshold, r: EXTI1::Resources) {}
+fn exti1(_t: &mut Threshold, r: EXTI1::Resources) {}