Skip to content

Commit 307153e

Browse files
Switch to non-doc comment
1 parent f17e2c9 commit 307153e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_middle/mir/predecessors.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ impl PredecessorCache {
2323
}
2424

2525
/// Invalidates the predecessor cache.
26-
///
27-
/// Invalidating the predecessor cache requires mutating the MIR, which in turn requires a
28-
/// unique reference (`&mut`) to the `mir::Body`. Because of this, we can assume that all
29-
/// callers of `invalidate` have a unique reference to the MIR and thus to the predecessor
30-
/// cache. This means we never need to do synchronization when `invalidate` is called.
3126
#[inline]
3227
pub(super) fn invalidate(&mut self) {
28+
// Invalidating the predecessor cache requires mutating the MIR, which in turn requires a
29+
// unique reference (`&mut`) to the `mir::Body`. Because of this, we can assume that all
30+
// callers of `invalidate` have a unique reference to the MIR and thus to the predecessor
31+
// cache. This means we never need to do synchronization when `invalidate` is called, we can
32+
// simply reinitialize the `OnceCell`.
3333
self.cache = OnceCell::new();
3434
}
3535

0 commit comments

Comments
 (0)