File tree 2 files changed +5
-3
lines changed
rustc_query_system/src/dep_graph
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1176,7 +1176,7 @@ impl<'tcx> TyCtxt<'tcx> {
1176
1176
}
1177
1177
1178
1178
crate fn query_kind ( self , k : DepKind ) -> & ' tcx DepKindStruct {
1179
- & self . query_kinds [ k. index ( ) as usize ]
1179
+ & self . query_kinds [ k. index ( ) ]
1180
1180
}
1181
1181
1182
1182
/// Constructs a `TyKind::Error` type and registers a `delay_span_bug` to ensure it gets used.
Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ impl DepKind {
58
58
/// We use this for most things when incr. comp. is turned off.
59
59
pub const NULL : Self = DepKind ( 0 ) ;
60
60
61
+ #[ inline]
61
62
pub const fn new ( index : u16 ) -> Self {
62
63
DepKind ( index)
63
64
}
64
65
65
- pub const fn index ( self ) -> u16 {
66
- self . 0
66
+ #[ inline]
67
+ pub const fn index ( self ) -> usize {
68
+ self . 0 as usize
67
69
}
68
70
}
69
71
You can’t perform that action at this time.
0 commit comments