File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
rustc_query_system/src/dep_graph Expand file tree Collapse file tree 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> {
11761176 }
11771177
11781178 crate fn query_kind ( self , k : DepKind ) -> & ' tcx DepKindStruct {
1179- & self . query_kinds [ k. index ( ) as usize ]
1179+ & self . query_kinds [ k. index ( ) ]
11801180 }
11811181
11821182 /// 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 {
5858 /// We use this for most things when incr. comp. is turned off.
5959 pub const NULL : Self = DepKind ( 0 ) ;
6060
61+ #[ inline]
6162 pub const fn new ( index : u16 ) -> Self {
6263 DepKind ( index)
6364 }
6465
65- pub const fn index ( self ) -> u16 {
66- self . 0
66+ #[ inline]
67+ pub const fn index ( self ) -> usize {
68+ self . 0 as usize
6769 }
6870}
6971
You can’t perform that action at this time.
0 commit comments