Skip to content

Commit

Permalink
inline Box::new always.
Browse files Browse the repository at this point in the history
(You shouldn't use it, but it is a semi-reasonable way to annotate
types when necessary.)
  • Loading branch information
pnkfelix committed Mar 3, 2015
1 parent 270f0ee commit b03279a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl<T> Box<T> {
/// let x = Box::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
Expand Down

0 comments on commit b03279a

Please sign in to comment.