Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Visit ItemKind::Impl for dead code lint
  • Loading branch information
varkor committed Mar 28, 2019
commit b3011dd711ea8bf4bcb04d96aff814863eff3973
1 change: 1 addition & 0 deletions src/librustc/middle/dead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
| hir::ItemKind::Ty(..)
| hir::ItemKind::Static(..)
| hir::ItemKind::Existential(..)
| hir::ItemKind::Impl(..)
| hir::ItemKind::Const(..) => {
intravisit::walk_item(self, &item);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove _ => () and replace with "exhaustive" match to avoid future problems?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure why this is not

_ => {
    intravisit::walk_item(self, &item);
}

If that doesn't break anything, then walk_item can be moved out of the match.

Expand Down