5 - Make more use of let_chains

This commit is contained in:
Caio
2022-02-28 15:52:36 -03:00
parent 48132caac2
commit d956c8b816
5 changed files with 63 additions and 68 deletions

View File

@@ -332,12 +332,11 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
let def_id = local_def_id.to_def_id();
// Don't run unused pass for #[derive()]
if let Some(parent) = self.tcx.parent(def_id) {
if let DefKind::Impl = self.tcx.def_kind(parent.expect_local()) {
if self.tcx.has_attr(parent, sym::automatically_derived) {
return;
}
}
if let Some(parent) = self.tcx.parent(def_id)
&& let DefKind::Impl = self.tcx.def_kind(parent.expect_local())
&& self.tcx.has_attr(parent, sym::automatically_derived)
{
return;
}
// Don't run unused pass for #[naked]