]> git.lizzy.rs Git - rust.git/commitdiff
remove FIXME(#30046) and infer moves on pattern matching
authorNiv Kaminer <nivkner@zoho.com>
Fri, 16 Mar 2018 23:00:40 +0000 (01:00 +0200)
committerNiv Kaminer <nivkner@zoho.com>
Sat, 17 Mar 2018 18:24:49 +0000 (20:24 +0200)
src/librustc_mir/build/block.rs
src/librustc_typeck/check/mod.rs

index ef30b1e452230df786add31df2af97b9344bda0d..7281fb59663881ee222345491332af71b5721070 100644 (file)
@@ -117,10 +117,9 @@ fn ast_block_stmts(&mut self,
                     // 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)
                                 })
                             }));
index f0f1064752d4aba8f323e64b367b18d66a0ee841..c99e49256faa048080ad22372d17d1294094c1d4 100644 (file)
@@ -2879,7 +2879,6 @@ fn expected_inputs_for_expected_output(&self,
                         // 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);
                             }