s/mt/mutability/

This commit is contained in:
Oli Scherer 2024-03-11 17:33:57 +00:00
parent d3514a036d
commit 926bfe5078
11 changed files with 28 additions and 21 deletions

View file

@ -48,8 +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, nested: false } = def_kind
&& matches!(mt, Mutability::Mut)
&& let hir::def::DefKind::Static { mutability: Mutability::Mut, nested: false } = def_kind
{
return Some(qpath_to_string(&qpath));
}