From e35698371d36da83d3aca8322ad812fa5512b90f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 19 Sep 2019 10:30:46 -0400 Subject: [PATCH] make clear that `invalidate` just replaces with `default` --- src/librustc_mir/build/scope.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 {