diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index 02039679517ca..3bca7894a2921 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -979,6 +979,7 @@ impl ConstructorSet { && !(pcx.is_top_level && matches!(self, Self::NoConstructors)) { // Treat all missing constructors as nonempty. + // This clears `missing_empty`. missing.append(&mut missing_empty); }