]> git.lizzy.rs Git - rust.git/commitdiff
Add inlining.
authorCamille GILLOT <gillot.camille@gmail.com>
Tue, 28 Apr 2020 09:57:38 +0000 (11:57 +0200)
committerCamille GILLOT <gillot.camille@gmail.com>
Tue, 28 Apr 2020 09:57:38 +0000 (11:57 +0200)
src/librustc_query_system/query/caches.rs

index e2fe6f7207ba6792cbdb7f4ef68897372b398b88..6a47abc5b4612e0755567f8958f304156bb59b0f 100644 (file)
@@ -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 _) };