diff options
| author | est31 <MTest31@outlook.com> | 2021-08-05 03:48:54 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2021-08-18 09:25:26 +0200 |
| commit | 1cd1cd034b6501cbfbd78a4d034e74aa188fb00e (patch) | |
| tree | 7f5b498aad76ebe54555445c3c8b7253d18b31a7 /compiler | |
| parent | 8b0b7ef812d38b0ef2f5e69bea29cfd061141e2f (diff) | |
| download | rust-1cd1cd034b6501cbfbd78a4d034e74aa188fb00e.tar.gz rust-1cd1cd034b6501cbfbd78a4d034e74aa188fb00e.zip | |
Remove box syntax from rustc_ast
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_ast/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_ast/src/ptr.rs | 2 |
2 files changed, 1 insertions, 2 deletions
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<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> { |
