Skip to content
Permalink
Browse files

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

  • Loading branch information...
eddyb committed Jun 12, 2019
1 parent 7e5f6c7 commit 25a920648a3b616469422ea0a9689297f108e8e3
Showing with 2 additions and 1 deletion.
  1. +1 −0 src/libsyntax/lib.rs
  2. +1 −1 src/libsyntax/ptr.rs
@@ -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
}
}

0 comments on commit 25a9206

Please sign in to comment.
You can’t perform that action at this time.