File tree 3 files changed +12
-0
lines changed
rustc_query_system/src/ich
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,14 @@ impl<'a> StableHashingContext<'a> {
178
178
}
179
179
180
180
impl < ' a > HashStable < StableHashingContext < ' a > > for ast:: NodeId {
181
+ #[ inline]
181
182
fn hash_stable ( & self , _: & mut StableHashingContext < ' a > , _: & mut StableHasher ) {
182
183
panic ! ( "Node IDs should not appear in incremental state" ) ;
183
184
}
184
185
}
185
186
186
187
impl < ' a > rustc_span:: HashStableContext for StableHashingContext < ' a > {
188
+ #[ inline]
187
189
fn hash_spans ( & self ) -> bool {
188
190
self . hash_spans
189
191
}
@@ -198,6 +200,7 @@ impl<'a> rustc_span::HashStableContext for StableHashingContext<'a> {
198
200
self . definitions . def_span ( def_id)
199
201
}
200
202
203
+ #[ inline]
201
204
fn span_data_to_lines_and_cols (
202
205
& mut self ,
203
206
span : & SpanData ,
Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
26
26
}
27
27
}
28
28
29
+ #[ inline]
29
30
fn hash_body_id ( & mut self , id : hir:: BodyId , hasher : & mut StableHasher ) {
30
31
let hcx = self ;
31
32
if hcx. hash_bodies ( ) {
32
33
hcx. body_resolver . body ( id) . hash_stable ( hcx, hasher) ;
33
34
}
34
35
}
35
36
37
+ #[ inline]
36
38
fn hash_reference_to_item ( & mut self , id : hir:: HirId , hasher : & mut StableHasher ) {
37
39
let hcx = self ;
38
40
@@ -41,6 +43,7 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
41
43
} )
42
44
}
43
45
46
+ #[ inline]
44
47
fn hash_hir_mod ( & mut self , module : & hir:: Mod < ' _ > , hasher : & mut StableHasher ) {
45
48
let hcx = self ;
46
49
let hir:: Mod { inner : ref inner_span, ref item_ids } = * module;
@@ -103,6 +106,7 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
103
106
}
104
107
}
105
108
109
+ #[ inline]
106
110
fn hash_hir_item_like < F : FnOnce ( & mut Self ) > ( & mut self , f : F ) {
107
111
let prev_hash_node_ids = self . node_id_hashing_mode ;
108
112
self . node_id_hashing_mode = NodeIdHashingMode :: Ignore ;
@@ -114,6 +118,7 @@ impl<'ctx> rustc_hir::HashStableContext for StableHashingContext<'ctx> {
114
118
}
115
119
116
120
impl < ' a > HashStable < StableHashingContext < ' a > > for hir:: Body < ' _ > {
121
+ #[ inline]
117
122
fn hash_stable ( & self , hcx : & mut StableHashingContext < ' a > , hasher : & mut StableHasher ) {
118
123
let hir:: Body { params, value, generator_kind } = self ;
119
124
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ pub struct CrateSource {
28
28
}
29
29
30
30
impl CrateSource {
31
+ #[ inline]
31
32
pub fn paths ( & self ) -> impl Iterator < Item = & PathBuf > {
32
33
self . dylib . iter ( ) . chain ( self . rlib . iter ( ) ) . chain ( self . rmeta . iter ( ) ) . map ( |p| & p. 0 )
33
34
}
@@ -47,6 +48,7 @@ pub enum CrateDepKind {
47
48
}
48
49
49
50
impl CrateDepKind {
51
+ #[ inline]
50
52
pub fn macros_only ( self ) -> bool {
51
53
match self {
52
54
CrateDepKind :: MacrosOnly => true ,
@@ -122,10 +124,12 @@ impl ExternCrate {
122
124
/// If true, then this crate is the crate named by the extern
123
125
/// crate referenced above. If false, then this crate is a dep
124
126
/// of the crate.
127
+ #[ inline]
125
128
pub fn is_direct ( & self ) -> bool {
126
129
self . dependency_of == LOCAL_CRATE
127
130
}
128
131
132
+ #[ inline]
129
133
pub fn rank ( & self ) -> impl PartialOrd {
130
134
// Prefer:
131
135
// - direct extern crate to indirect
You can’t perform that action at this time.
0 commit comments