From 1cd1cd034b6501cbfbd78a4d034e74aa188fb00e Mon Sep 17 00:00:00 2001 From: est31 Date: Thu, 5 Aug 2021 03:48:54 +0200 Subject: 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(-) (limited to 'compiler/rustc_ast') diff --git a/compiler/rustc_ast/src/lib.rs b/compiler/rustc_ast/src/lib.rs index 922e86e386b..502bd69e6a9 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 e4a3cccb7ea..9fe87a0a637 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 { -- cgit 1.4.1-3-g733a5