about summary refs log tree commit diff
path: root/src/librustc_query_system
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2020-04-28 11:57:38 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2020-04-28 11:57:38 +0200
commitd7d2185607280e143ea25b1cf688cb6f27f2db45 (patch)
treea0327aee0840d16937276bbe4df55de0f2ff048f /src/librustc_query_system
parente33327782f868e81ece04b40d6fae56ede9845cd (diff)
downloadrust-d7d2185607280e143ea25b1cf688cb6f27f2db45.tar.gz
rust-d7d2185607280e143ea25b1cf688cb6f27f2db45.zip
Add inlining.
Diffstat (limited to 'src/librustc_query_system')
-rw-r--r--src/librustc_query_system/query/caches.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_query_system/query/caches.rs b/src/librustc_query_system/query/caches.rs
index e2fe6f7207b..6a47abc5b46 100644
--- a/src/librustc_query_system/query/caches.rs
+++ b/src/librustc_query_system/query/caches.rs
@@ -80,6 +80,7 @@ impl<K: Eq + Hash, V: Clone> QueryStorage for DefaultCache<K, V> {
     type Value = V;
     type Stored = V;
 
+    #[inline]
     fn store_nocache(&self, value: Self::Value) -> Self::Stored {
         // We have no dedicated storage
         value
@@ -157,6 +158,7 @@ impl<'tcx, K: Eq + Hash, V: 'tcx> QueryStorage for ArenaCache<'tcx, K, V> {
     type Value = V;
     type Stored = &'tcx V;
 
+    #[inline]
     fn store_nocache(&self, value: Self::Value) -> Self::Stored {
         let value = self.arena.alloc((value, DepNodeIndex::INVALID));
         let value = unsafe { &*(&value.0 as *const _) };