From b03279aaa2b20f6033e66fc7aea29c0b43e71082 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Mon, 16 Feb 2015 11:53:29 +0100 Subject: [PATCH] inline `Box::new` always. (You shouldn't use it, but it is a semi-reasonable way to annotate types when necessary.) --- src/liballoc/boxed.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index a93872dfe36..75160476d71 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -94,6 +94,7 @@ impl Box { /// let x = Box::new(5); /// ``` #[stable(feature = "rust1", since = "1.0.0")] + #[inline(always)] pub fn new(x: T) -> Box { box x }