|
10 | 10 | use crate::rustc_internal::{self, opaque}; |
11 | 11 | use crate::stable_mir::mir::{CopyNonOverlapping, UserTypeProjection, VariantIdx}; |
12 | 12 | use crate::stable_mir::ty::{ |
13 | | - allocation_filter, new_allocation, Const, FloatTy, GenericParamDef, IntTy, |
14 | | - Movability, RigidTy, TyKind, UintTy, |
| 13 | + allocation_filter, new_allocation, Const, FloatTy, GenericParamDef, IntTy, Movability, RigidTy, |
| 14 | + TyKind, UintTy, |
15 | 15 | }; |
16 | 16 | use crate::stable_mir::{self, Context}; |
17 | 17 | use rustc_hir as hir; |
@@ -103,16 +103,13 @@ impl<'tcx> Context for Tables<'tcx> { |
103 | 103 | } |
104 | 104 |
|
105 | 105 | fn generics_of(&mut self, def_id: stable_mir::DefId) -> stable_mir::ty::Generics { |
106 | | - let def_id = self.def_ids[def_id]; |
| 106 | + let def_id = self[def_id]; |
107 | 107 | let generics = self.tcx.generics_of(def_id); |
108 | 108 | generics.stable(self) |
109 | 109 | } |
110 | 110 |
|
111 | | - fn predicates_of( |
112 | | - &mut self, |
113 | | - def_id: stable_mir::DefId, |
114 | | - ) -> stable_mir::GenericPredicates { |
115 | | - let def_id = self.def_ids[def_id]; |
| 111 | + fn predicates_of(&mut self, def_id: stable_mir::DefId) -> stable_mir::GenericPredicates { |
| 112 | + let def_id = self[def_id]; |
116 | 113 | let ty::GenericPredicates { parent, predicates } = self.tcx.predicates_of(def_id); |
117 | 114 | stable_mir::GenericPredicates { |
118 | 115 | parent: parent.map(|did| self.trait_def(did)), |
|
0 commit comments