inline Box::new always.
(You shouldn't use it, but it is a semi-reasonable way to annotate types when necessary.)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user