Skip to content

Commit

Permalink
syntax: use box instead of Box::new in ptr::P.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jul 1, 2019
1 parent 7e5f6c7 commit 25a9206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libsyntax/lib.rs
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/libsyntax/ptr.rs
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 25a9206

Please sign in to comment.