Skip to content

Commit 25a9206

Browse files
committed
syntax: use box instead of Box::new in ptr::P.
1 parent 7e5f6c7 commit 25a9206

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/libsyntax/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#![deny(unused_lifetimes)]
1313

1414
#![feature(bind_by_move_pattern_guards)]
15+
#![feature(box_syntax)]
1516
#![feature(const_fn)]
1617
#![feature(const_transmute)]
1718
#![feature(crate_visibility_modifier)]

src/libsyntax/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub struct P<T: ?Sized> {
4545
/// Construct a `P<T>` from a `T` value.
4646
pub fn P<T: 'static>(value: T) -> P<T> {
4747
P {
48-
ptr: Box::new(value)
48+
ptr: box value
4949
}
5050
}
5151

0 commit comments

Comments
 (0)