From 69d12a2b97f4f09dba2e09542c74da48ea88ba08 Mon Sep 17 00:00:00 2001 From: Niv Kaminer Date: Sat, 17 Mar 2018 01:00:40 +0200 Subject: [PATCH] remove FIXME(#30046) and infer moves on pattern matching --- src/librustc_mir/build/block.rs | 5 ++--- src/librustc_typeck/check/mod.rs | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/librustc_mir/build/block.rs b/src/librustc_mir/build/block.rs index ef30b1e45223..7281fb596638 100644 --- a/src/librustc_mir/build/block.rs +++ b/src/librustc_mir/build/block.rs @@ -117,10 +117,9 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> { // Evaluate the initializer, if present. if let Some(init) = initializer { unpack!(block = this.in_opt_scope( - opt_destruction_scope.map(|de|(de, source_info)), block, move |this| { + opt_destruction_scope.map(|de|(de, source_info)), block, |this| { let scope = (init_scope, source_info); - this.in_scope(scope, lint_level, block, move |this| { - // FIXME #30046 ^~~~ + this.in_scope(scope, lint_level, block, |this| { this.expr_into_pattern(block, pattern, init) }) })); diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index f0f1064752d4..c99e49256faa 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -2879,7 +2879,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { // just trying to get hints here. self.save_and_restore_in_snapshot_flag(|_| { let mut fulfill = FulfillmentContext::new(); - let ok = ok; // FIXME(#30046) for obligation in ok.obligations { fulfill.register_predicate_obligation(self, obligation); }