summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-10-03 16:07:26 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2021-10-03 16:08:57 +0200
commitb2ed9c4007767f6cf692229cffd471d4ce5fde55 (patch)
treeb3f600b6f3282ab00d51ee51932154d8da21f6f7 /compiler/rustc_session/src
parent48ae6ec4f343745d94f5fc2cc7a0b7a085cb6c40 (diff)
downloadrust-b2ed9c4007767f6cf692229cffd471d4ce5fde55.tar.gz
rust-b2ed9c4007767f6cf692229cffd471d4ce5fde55.zip
Add some inlining.
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/cstore.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/cstore.rs b/compiler/rustc_session/src/cstore.rs
index 4b93a3e8e83..9d6bd201039 100644
--- a/compiler/rustc_session/src/cstore.rs
+++ b/compiler/rustc_session/src/cstore.rs
@@ -28,6 +28,7 @@ pub struct CrateSource {
 }
 
 impl CrateSource {
+    #[inline]
     pub fn paths(&self) -> impl Iterator<Item = &PathBuf> {
         self.dylib.iter().chain(self.rlib.iter()).chain(self.rmeta.iter()).map(|p| &p.0)
     }
@@ -47,6 +48,7 @@ pub enum CrateDepKind {
 }
 
 impl CrateDepKind {
+    #[inline]
     pub fn macros_only(self) -> bool {
         match self {
             CrateDepKind::MacrosOnly => true,
@@ -122,10 +124,12 @@ impl ExternCrate {
     /// If true, then this crate is the crate named by the extern
     /// crate referenced above. If false, then this crate is a dep
     /// of the crate.
+    #[inline]
     pub fn is_direct(&self) -> bool {
         self.dependency_of == LOCAL_CRATE
     }
 
+    #[inline]
     pub fn rank(&self) -> impl PartialOrd {
         // Prefer:
         // - direct extern crate to indirect