Fix some more clippy warnings
This commit is contained in:
parent
388ef34904
commit
bfecb18771
16 changed files with 71 additions and 97 deletions
|
@ -1219,9 +1219,11 @@ impl<'tcx> Visitor<'tcx> for TypePrivacyVisitor<'tcx> {
|
|||
.maybe_typeck_results
|
||||
.and_then(|typeck_results| typeck_results.type_dependent_def(id)),
|
||||
};
|
||||
let def = def.filter(|(kind, _)| match kind {
|
||||
DefKind::AssocFn | DefKind::AssocConst | DefKind::AssocTy | DefKind::Static => true,
|
||||
_ => false,
|
||||
let def = def.filter(|(kind, _)| {
|
||||
matches!(
|
||||
kind,
|
||||
DefKind::AssocFn | DefKind::AssocConst | DefKind::AssocTy | DefKind::Static
|
||||
)
|
||||
});
|
||||
if let Some((kind, def_id)) = def {
|
||||
let is_local_static =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue