syntax: use box
instead of Box::new
in ptr::P
.
This commit is contained in:
parent
7e5f6c7f83
commit
25a920648a
@ -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)]
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user