about summary refs log tree commit diff
path: root/compiler/rustc_index/src/vec.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-10-31 16:06:56 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2022-11-01 17:02:51 +0000
commit07f19480438e290cab41c3b61478ba993c284824 (patch)
tree9f41a847997a066cb4c5899a4551337f4470c852 /compiler/rustc_index/src/vec.rs
parent024207ab43aceb49f2ca957509c503ccf12089d7 (diff)
downloadrust-07f19480438e290cab41c3b61478ba993c284824.tar.gz
rust-07f19480438e290cab41c3b61478ba993c284824.zip
Implement Idx for OwnerId.
Diffstat (limited to 'compiler/rustc_index/src/vec.rs')
-rw-r--r--compiler/rustc_index/src/vec.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs
index 4172ce3bb30..1519258c794 100644
--- a/compiler/rustc_index/src/vec.rs
+++ b/compiler/rustc_index/src/vec.rs
@@ -17,10 +17,12 @@ pub trait Idx: Copy + 'static + Eq + PartialEq + Debug + Hash {
 
     fn index(self) -> usize;
 
+    #[inline]
     fn increment_by(&mut self, amount: usize) {
         *self = self.plus(amount);
     }
 
+    #[inline]
     fn plus(self, amount: usize) -> Self {
         Self::new(self.index() + amount)
     }