Auto merge of #95436 - cjgillot:static-mut, r=oli-obk
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:
commit
a40c595695
40 changed files with 98 additions and 128 deletions
|
@ -1530,7 +1530,7 @@ impl Expr<'_> {
|
|||
pub fn is_place_expr(&self, mut allow_projections_from: impl FnMut(&Self) -> bool) -> bool {
|
||||
match self.kind {
|
||||
ExprKind::Path(QPath::Resolved(_, ref path)) => {
|
||||
matches!(path.res, Res::Local(..) | Res::Def(DefKind::Static, _) | Res::Err)
|
||||
matches!(path.res, Res::Local(..) | Res::Def(DefKind::Static(_), _) | Res::Err)
|
||||
}
|
||||
|
||||
// Type ascription inherits its place expression kind from its
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue