Add nested
bool to DefKind::Static
.
Will be used in the next commit
This commit is contained in:
parent
9816915954
commit
0b4cbee660
10 changed files with 19 additions and 13 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue