From 1cd1cd034b6501cbfbd78a4d034e74aa188fb00e Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 5 Aug 2021 03:48:54 +0200 Subject: [PATCH] Remove box syntax from rustc_ast --- compiler/rustc_ast/src/lib.rs | 1 - compiler/rustc_ast/src/ptr.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_ast/src/lib.rs b/compiler/rustc_ast/src/lib.rs index 922e86e386b8..502bd69e6a9a 100644 --- a/compiler/rustc_ast/src/lib.rs +++ b/compiler/rustc_ast/src/lib.rs @@ -8,7 +8,6 @@ html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/", test(attr(deny(warnings))) )] -#![feature(box_syntax)] #![feature(box_patterns)] #![cfg_attr(bootstrap, feature(const_fn_transmute))] #![feature(crate_visibility_modifier)] diff --git a/compiler/rustc_ast/src/ptr.rs b/compiler/rustc_ast/src/ptr.rs index e4a3cccb7ead..9fe87a0a637b 100644 --- a/compiler/rustc_ast/src/ptr.rs +++ b/compiler/rustc_ast/src/ptr.rs @@ -37,7 +37,7 @@ pub struct P { /// Construct a `P` from a `T` value. #[allow(non_snake_case)] pub fn P(value: T) -> P { - P { ptr: box value } + P { ptr: Box::new(value) } } impl P {