Skip to content

Commit

Permalink
Auto merge of rust-lang#13253 - Veykril:simplify, r=Veykril
Browse files Browse the repository at this point in the history
Simplify
  • Loading branch information
bors committed Sep 18, 2022
2 parents 11bf2e7 + 0d9f971 commit 39eaf78
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/hir-def/src/item_scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use crate::{
ConstId, HasModule, ImplId, LocalModuleId, MacroId, ModuleDefId, ModuleId, TraitId,
};

#[derive(Copy, Clone)]
#[derive(Copy, Clone, Debug)]
pub(crate) enum ImportType {
Glob,
Named,
Expand Down Expand Up @@ -302,13 +302,13 @@ impl ItemScope {
$changed = true;
}
Entry::Occupied(mut entry)
if $glob_imports.$field.contains(&$lookup)
&& matches!($def_import_type, ImportType::Named) =>
if matches!($def_import_type, ImportType::Named) =>
{
cov_mark::hit!(import_shadowed);
$glob_imports.$field.remove(&$lookup);
entry.insert(fld);
$changed = true;
if $glob_imports.$field.remove(&$lookup) {
cov_mark::hit!(import_shadowed);
entry.insert(fld);
$changed = true;
}
}
_ => {}
}
Expand Down

0 comments on commit 39eaf78

Please sign in to comment.