|
41 | 41 | //! ``` |
42 | 42 | //! let ghost id = half1.id(); |
43 | 43 | //! proof { half1.perform_using_two_halves(&mut half2); } |
44 | | -//! assert(half1.id() == half2.id() == id); |
| 44 | +//! assert(half1.id() == id); |
| 45 | +//! assert(half2.id() == id); |
45 | 46 | //! assert(half1@ is Complete); |
46 | 47 | //! assert(half2@ is Complete); |
47 | 48 | //! ``` |
@@ -173,7 +174,8 @@ impl OneShotResource { |
173 | 174 | let (half1, half2) = return_value; |
174 | 175 | &&& half1@ is HalfRightToComplete |
175 | 176 | &&& half2@ is HalfRightToComplete |
176 | | - &&& half2.id() == half1.id() == self.id() |
| 177 | + &&& half1.id() == self.id() |
| 178 | + &&& half2.id() == self.id() |
177 | 179 | }), |
178 | 180 | { |
179 | 181 | let half = OneShotResourceValue::HalfRightToComplete { }; |
@@ -219,7 +221,8 @@ impl OneShotResource { |
219 | 221 | old(other)@ is HalfRightToComplete, |
220 | 222 | self@ is Complete, |
221 | 223 | other@ is Complete, |
222 | | - other.id() == self.id() == old(self).id(), |
| 224 | + self.id() == old(self).id(), |
| 225 | + other.id() == old(self).id(), |
223 | 226 | { |
224 | 227 | self.r.validate(); |
225 | 228 | other.r.validate(); |
@@ -277,11 +280,13 @@ fn main() { |
277 | 280 | proof { |
278 | 281 | half1.perform_using_two_halves(&mut half2); |
279 | 282 | } |
280 | | - assert(half1.id() == half2.id() == id); |
| 283 | + assert(half1.id() == id); |
| 284 | + assert(half2.id() == id); |
281 | 285 | assert(half1@ is Complete); |
282 | 286 | assert(half2@ is Complete); |
283 | 287 | let tracked knowledge = half1.duplicate(); |
284 | | - assert(knowledge.id() == half1.id() == id); |
| 288 | + assert(knowledge.id() == id); |
| 289 | + assert(half1.id() == id); |
285 | 290 | assert(knowledge@ is Complete); |
286 | 291 | } |
287 | 292 |
|
|
0 commit comments