remove redundant branch
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
parent
17e86d9ff9
commit
f1c256d168
@ -86,13 +86,13 @@ fn debugger_visualizers<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> Vec<Debugger
|
||||
let mut debugger_visualizers = FxHashSet::default();
|
||||
|
||||
// Collect debugger visualizers in this crate.
|
||||
tcx.hir().for_each_module(
|
||||
|id| check_for_debugger_visualizer(
|
||||
tcx.hir().for_each_module(|id| {
|
||||
check_for_debugger_visualizer(
|
||||
tcx,
|
||||
tcx.hir().local_def_id_to_hir_id(id),
|
||||
&mut debugger_visualizers
|
||||
&mut debugger_visualizers,
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
// Collect debugger visualizers on the crate attributes.
|
||||
check_for_debugger_visualizer(tcx, CRATE_HIR_ID, &mut debugger_visualizers);
|
||||
|
@ -1847,17 +1847,6 @@ pub fn check_item(&mut self, id: ItemId) {
|
||||
let item_visibility = tcx.visibility(id.def_id);
|
||||
let def_kind = tcx.def_kind(id.def_id);
|
||||
|
||||
if matches!(
|
||||
def_kind,
|
||||
DefKind::ExternCrate
|
||||
| DefKind::Mod
|
||||
| DefKind::Use
|
||||
| DefKind::Macro(_)
|
||||
| DefKind::GlobalAsm
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
match def_kind {
|
||||
DefKind::Const | DefKind::Static(_) | DefKind::Fn | DefKind::TyAlias => {
|
||||
self.check(id.def_id, item_visibility).generics().predicates().ty();
|
||||
|
Loading…
Reference in New Issue
Block a user