syntax: use box instead of Box::new in ptr::P.

This commit is contained in:
Eduard-Mihai Burtescu 2019-06-12 09:36:12 +03:00
parent 7e5f6c7f83
commit 25a920648a
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
#![deny(unused_lifetimes)]
#![feature(bind_by_move_pattern_guards)]
#![feature(box_syntax)]
#![feature(const_fn)]
#![feature(const_transmute)]
#![feature(crate_visibility_modifier)]

View File

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