File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ impl PredecessorCache {
23
23
}
24
24
25
25
/// 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.
31
26
#[ inline]
32
27
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`.
33
33
self . cache = OnceCell :: new ( ) ;
34
34
}
35
35
You can’t perform that action at this time.
0 commit comments