about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/hir/lowering.rs12
-rw-r--r--src/librustc/hir/lowering/expr.rs11
2 files changed, 11 insertions, 12 deletions
diff --git a/src/librustc/hir/lowering.rs b/src/librustc/hir/lowering.rs
index 5793dc019c3..db70d18bd83 100644
--- a/src/librustc/hir/lowering.rs
+++ b/src/librustc/hir/lowering.rs
@@ -5113,18 +5113,6 @@ impl<'a> LoweringContext<'a> {
             )
         }
     }
-
-    fn wrap_in_try_constructor(
-        &mut self,
-        method: Symbol,
-        e: hir::Expr,
-        unstable_span: Span,
-    ) -> P<hir::Expr> {
-        let path = &[sym::ops, sym::Try, method];
-        let from_err = P(self.expr_std_path(unstable_span, path, None,
-                                            ThinVec::new()));
-        P(self.expr_call(e.span, from_err, hir_vec![e]))
-    }
 }
 
 fn body_ids(bodies: &BTreeMap<hir::BodyId, hir::Body>) -> Vec<hir::BodyId> {
diff --git a/src/librustc/hir/lowering/expr.rs b/src/librustc/hir/lowering/expr.rs
index 711ec662301..378588d25b2 100644
--- a/src/librustc/hir/lowering/expr.rs
+++ b/src/librustc/hir/lowering/expr.rs
@@ -368,6 +368,17 @@ impl LoweringContext<'_> {
         })
     }
 
+    fn wrap_in_try_constructor(
+        &mut self,
+        method: Symbol,
+        e: hir::Expr,
+        unstable_span: Span,
+    ) -> P<hir::Expr> {
+        let path = &[sym::ops, sym::Try, method];
+        let from_err = P(self.expr_std_path(unstable_span, path, None, ThinVec::new()));
+        P(self.expr_call(e.span, from_err, hir_vec![e]))
+    }
+
     /// Desugar `<expr>.await` into:
     /// ```rust
     /// {