diff --git a/src/librustc_mir/build/scope.rs b/src/librustc_mir/build/scope.rs index 3c735c8cb09..9c1acb3faae 100644 --- a/src/librustc_mir/build/scope.rs +++ b/src/librustc_mir/build/scope.rs @@ -189,8 +189,7 @@ pub enum BreakableTarget { impl CachedBlock { fn invalidate(&mut self) { - self.generator_drop = None; - self.unwind = None; + *self = CachedBlock::default(); } fn get(&self, generator_drop: bool) -> Option {