Add inlining attributes for query system functions

This commit is contained in:
John Kåre Alsaker
2023-02-23 01:14:48 +01:00
parent a049550c45
commit ab5d3fbe7d
3 changed files with 10 additions and 0 deletions

View File

@@ -1011,6 +1011,7 @@ impl<'tcx> TyCtxt<'tcx> {
/// Note that this is *untracked* and should only be used within the query
/// system if the result is otherwise tracked through queries
#[inline]
pub fn cstore_untracked(self) -> MappedReadGuard<'tcx, CrateStoreDyn> {
ReadGuard::map(self.untracked.cstore.read(), |c| &**c)
}