Skip to content

Commit e356983

Browse files
committed
make clear that invalidate just replaces with default
1 parent 9a447a2 commit e356983

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustc_mir/build/scope.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ pub enum BreakableTarget {
189189

190190
impl CachedBlock {
191191
fn invalidate(&mut self) {
192-
self.generator_drop = None;
193-
self.unwind = None;
192+
*self = CachedBlock::default();
194193
}
195194

196195
fn get(&self, generator_drop: bool) -> Option<BasicBlock> {

0 commit comments

Comments
 (0)