Remember mutability in DefKind::Static
.
This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
This commit is contained in:
parent
11909e3588
commit
21a554caf6
40 changed files with 98 additions and 128 deletions
|
@ -701,7 +701,7 @@ impl<'tcx> SaveContext<'tcx> {
|
|||
let parent_def_id = self.tcx.parent(def_id).unwrap();
|
||||
Some(Ref { kind: RefKind::Type, span, ref_id: id_from_def_id(parent_def_id) })
|
||||
}
|
||||
Res::Def(HirDefKind::Static | HirDefKind::Const | HirDefKind::AssocConst, _) => {
|
||||
Res::Def(HirDefKind::Static(_) | HirDefKind::Const | HirDefKind::AssocConst, _) => {
|
||||
Some(Ref { kind: RefKind::Variable, span, ref_id: id_from_def_id(res.def_id()) })
|
||||
}
|
||||
Res::Def(HirDefKind::AssocFn, decl_id) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue