]> git.lizzy.rs Git - rust.git/commitdiff
add inline attributes to stage 0 methods
authorTim Neumann <mail@timnn.me>
Sat, 18 Mar 2017 13:52:35 +0000 (14:52 +0100)
committerTim Neumann <mail@timnn.me>
Sat, 18 Mar 2017 13:52:35 +0000 (14:52 +0100)
src/libcore/num/mod.rs

index d12002fdfa7f27e17aca0bc876127ba466ca3010..0411fb7741f708088e50ae4eda495d721a64ec5a 100644 (file)
@@ -859,6 +859,7 @@ pub fn wrapping_shl(self, rhs: u32) -> Self {
 
         /// Stage 0
         #[stable(feature = "num_wrapping", since = "1.2.0")]
+        #[inline(always)]
         #[cfg(stage0)]
         pub fn wrapping_shl(self, rhs: u32) -> Self {
             self.overflowing_shl(rhs).0
@@ -894,6 +895,7 @@ pub fn wrapping_shr(self, rhs: u32) -> Self {
 
         /// Stage 0
         #[stable(feature = "num_wrapping", since = "1.2.0")]
+        #[inline(always)]
         #[cfg(stage0)]
         pub fn wrapping_shr(self, rhs: u32) -> Self {
             self.overflowing_shr(rhs).0
@@ -2025,6 +2027,7 @@ pub fn wrapping_shl(self, rhs: u32) -> Self {
 
         /// Stage 0
         #[stable(feature = "num_wrapping", since = "1.2.0")]
+        #[inline(always)]
         #[cfg(stage0)]
         pub fn wrapping_shl(self, rhs: u32) -> Self {
             self.overflowing_shl(rhs).0
@@ -2060,6 +2063,7 @@ pub fn wrapping_shr(self, rhs: u32) -> Self {
 
         /// Stage 0
         #[stable(feature = "num_wrapping", since = "1.2.0")]
+        #[inline(always)]
         #[cfg(stage0)]
         pub fn wrapping_shr(self, rhs: u32) -> Self {
             self.overflowing_shr(rhs).0