Skip to content

Commit

Permalink
Switch to non-doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed May 22, 2020
1 parent f17e2c9 commit 307153e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/librustc_middle/mir/predecessors.rs
Expand Up @@ -23,13 +23,13 @@ impl PredecessorCache {
}

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

Expand Down

0 comments on commit 307153e

Please sign in to comment.