about summary refs log tree commit diff
path: root/compiler/rustc_target/src/abi
diff options
context:
space:
mode:
authorAndreas Liljeqvist <bonega@gmail.com>2021-08-24 10:18:07 +0200
committerAndreas Liljeqvist <bonega@gmail.com>2021-08-24 10:18:07 +0200
commite3f07b2e30eb29a737b13ab127db927d3825c22b (patch)
tree0ea20afa3988c1477fe250337b29beb4e467bc24 /compiler/rustc_target/src/abi
parentd92810646ed517376b16ac3b1fed329d8df2a8a9 (diff)
Force inline: small functions and single call-site
Diffstat (limited to 'compiler/rustc_target/src/abi')
-rw-r--r--compiler/rustc_target/src/abi/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs
index b352243c0c4..49c06fca85a 100644
--- a/compiler/rustc_target/src/abi/mod.rs
+++ b/compiler/rustc_target/src/abi/mod.rs
@@ -697,7 +697,7 @@ pub struct WrappingRange {
 
 impl WrappingRange {
     /// Returns `true` if `v` is contained in the range.
-    #[inline]
+    #[inline(always)]
     pub fn contains(&self, v: u128) -> bool {
         if self.start <= self.end {
             self.start <= v && v <= self.end
@@ -708,17 +708,19 @@ impl WrappingRange {
 
     /// Returns `true` if zero is contained in the range.
     /// Equal to `range.contains(0)` but should be faster.
-    #[inline]
+    #[inline(always)]
     pub fn contains_zero(&self) -> bool {
         self.start > self.end || self.start == 0
     }
 
     /// Returns new `WrappingRange` with replaced `start`
+    #[inline(always)]
     pub fn with_start(&self, start: u128) -> Self {
         Self { start, end: self.end }
     }
 
     /// Returns new `WrappingRange` with replaced `end`
+    #[inline(always)]
     pub fn with_end(&self, end: u128) -> Self {
         Self { start: self.start, end }
     }