Switch to non-doc comment

This commit is contained in:
Dylan MacKenzie 2020-05-16 11:26:21 -07:00
parent f17e2c93a6
commit 307153e611

View File

@ -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();
}