From 395e7dfc2a0bb20f7b56217d304b8df8e24cb6a1 Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 5 Aug 2021 04:50:39 +0200 Subject: [PATCH] Remove box syntax from rustc_typeck --- compiler/rustc_typeck/src/check/_match.rs | 8 ++++---- compiler/rustc_typeck/src/lib.rs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_typeck/src/check/_match.rs b/compiler/rustc_typeck/src/check/_match.rs index 846c5fc09f2cf..87fd8f1e03bb3 100644 --- a/compiler/rustc_typeck/src/check/_match.rs +++ b/compiler/rustc_typeck/src/check/_match.rs @@ -108,7 +108,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { 0 => (arm_span, ObligationCauseCode::BlockTailExpression(arm.body.hir_id)), _ => ( expr.span, - ObligationCauseCode::MatchExpressionArm(box MatchExpressionArmCause { + ObligationCauseCode::MatchExpressionArm(Box::new(MatchExpressionArmCause { arm_span, scrut_span: scrut.span, semi_span, @@ -117,7 +117,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { last_ty: prior_arm_ty.unwrap(), scrut_hir_id: scrut.hir_id, opt_suggest_box_span, - }), + })), ), }; let cause = self.cause(span, code); @@ -397,13 +397,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // Finally construct the cause: self.cause( error_sp, - ObligationCauseCode::IfExpression(box IfExpressionCause { + ObligationCauseCode::IfExpression(Box::new(IfExpressionCause { then: then_sp, else_sp: error_sp, outer: outer_sp, semicolon: remove_semicolon, opt_suggest_box_span, - }), + })), ) } diff --git a/compiler/rustc_typeck/src/lib.rs b/compiler/rustc_typeck/src/lib.rs index faf00816994ab..9ed2a965dbeab 100644 --- a/compiler/rustc_typeck/src/lib.rs +++ b/compiler/rustc_typeck/src/lib.rs @@ -58,7 +58,6 @@ This API is completely unstable and subject to change. #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![cfg_attr(bootstrap, feature(bindings_after_at))] #![feature(bool_to_option)] -#![feature(box_syntax)] #![feature(crate_visibility_modifier)] #![feature(format_args_capture)] #![feature(in_band_lifetimes)]