diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2017-04-21 21:24:28 -0500 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2017-04-21 21:24:28 -0500 |
| commit | eea803008390cbae307e873ce6d39e01d6367759 (patch) | |
| tree | c759d6c28a01fa8fa89abd52326720c5d3b5b8d3 /tests/cfail/ceiling.rs | |
| parent | 1c82f1b1190cb40a3502d5b74a8c98775a788850 (diff) | |
reword the comments in compile-fail tests
Diffstat (limited to 'tests/cfail/ceiling.rs')
| -rw-r--r-- | tests/cfail/ceiling.rs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/cfail/ceiling.rs b/tests/cfail/ceiling.rs index 8bbd1f7..b13be80 100644 --- a/tests/cfail/ceiling.rs +++ b/tests/cfail/ceiling.rs @@ -7,20 +7,24 @@ static R1: Resource<(), C3> = Resource::new(()); fn j1(prio: P2) { let ceil = prio.as_ceiling(); - let c3 = ceil.raise(&R1, |ceil| { - // forbidden: ceiling token can't outlive critical section - ceil //~ error - }); + let c3 = ceil.raise( + &R1, |ceil| { + // forbidden: ceiling token can't outlive the critical section + ceil //~ error + } + ); // Would be bad: lockless access to a resource with ceiling = 3 let r2 = R1.borrow(&prio, c3); } fn j2(prio: P0) { - let c16 = rtfm::critical(|c16| { - // forbidden: ceiling token can't outlive critical section - c16 //~ error - }); + let c16 = rtfm::critical( + |c16| { + // forbidden: ceiling token can't outlive the critical section + c16 //~ error + }, + ); // Would be bad: lockless access to a resource with ceiling = 16 let r1 = R1.borrow(&prio, c16); |
