1
Fork 0

Add nested bool to DefKind::Static.

Will be used in the next commit
This commit is contained in:
Oli Scherer 2024-02-23 23:29:09 +00:00
parent 9816915954
commit 0b4cbee660
10 changed files with 19 additions and 13 deletions

View file

@ -48,7 +48,7 @@ fn is_path_static_mut(expr: hir::Expr<'_>) -> Option<String> {
if let hir::ExprKind::Path(qpath) = expr.kind
&& let hir::QPath::Resolved(_, path) = qpath
&& let hir::def::Res::Def(def_kind, _) = path.res
&& let hir::def::DefKind::Static { mt } = def_kind
&& let hir::def::DefKind::Static { mt, nested: false } = def_kind
&& matches!(mt, Mutability::Mut)
{
return Some(qpath_to_string(&qpath));