From 878ccd22fa6562afd6658f6558632ba8953ae22a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 17 Jun 2024 19:46:07 +0200 Subject: [PATCH] There's nothing to bind for a wildcard This commit was obtained by repeatedly inlining and simplifying. --- compiler/rustc_mir_build/src/build/matches/mod.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs index 3826f58a6c9..17b5e1b4955 100644 --- a/compiler/rustc_mir_build/src/build/matches/mod.rs +++ b/compiler/rustc_mir_build/src/build/matches/mod.rs @@ -2491,14 +2491,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { true, ); // This block is for the failure case - let failure = this.bind_pattern( - this.source_info(else_block_span), - wildcard, - &[], - initializer_span, - None, - true, - ); + let failure = wildcard.pre_binding_block.unwrap(); // If branch coverage is enabled, record this branch. this.visit_coverage_conditional_let(pattern, matching, failure);