From 307153e611433f9224224a4511b6ea4f362ffe28 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Sat, 16 May 2020 11:26:21 -0700 Subject: [PATCH] Switch to non-doc comment --- src/librustc_middle/mir/predecessors.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librustc_middle/mir/predecessors.rs b/src/librustc_middle/mir/predecessors.rs index 36e92c71c07f4..7508c0239397f 100644 --- a/src/librustc_middle/mir/predecessors.rs +++ b/src/librustc_middle/mir/predecessors.rs @@ -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(); }