From eea803008390cbae307e873ce6d39e01d6367759 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 21 Apr 2017 21:24:28 -0500 Subject: reword the comments in compile-fail tests --- tests/cfail/ceiling.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tests/cfail/ceiling.rs') 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); -- cgit v1.2.3