Remove box syntax from rustc_ast

This commit is contained in:
est31 2021-08-05 03:48:54 +02:00
parent 8b0b7ef812
commit 1cd1cd034b
2 changed files with 1 additions and 2 deletions

View file

@ -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)]

View file

@ -37,7 +37,7 @@ pub struct P<T: ?Sized> {
/// Construct a `P<T>` from a `T` value.
#[allow(non_snake_case)]
pub fn P<T: 'static>(value: T) -> P<T> {
P { ptr: box value }
P { ptr: Box::new(value) }
}
impl<T: 'static> P<T> {