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
|
@ -397,7 +397,7 @@ crate fn register_res(cx: &mut DocContext<'_>, res: Res) -> DefId {
|
|||
// These should be added to the cache using `record_extern_fqn`.
|
||||
Res::Def(
|
||||
kind @ (AssocTy | AssocFn | AssocConst | Variant | Fn | TyAlias | Enum | Trait | Struct
|
||||
| Union | Mod | ForeignTy | Const | Static | Macro(..) | TraitAlias),
|
||||
| Union | Mod | ForeignTy | Const | Static(_) | Macro(..) | TraitAlias),
|
||||
i,
|
||||
) => (i, kind.into()),
|
||||
// This is part of a trait definition or trait impl; document the trait.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue