Auto merge of #78066 - bugadani:wat, r=jonas-schievink
Clean up small, surprising bits of code This PR clean up a small number of unrelated, small things I found while browsing the code base.
This commit is contained in:
commit
834821e3b6
6 changed files with 49 additions and 54 deletions
|
@ -458,8 +458,8 @@ fn create_and_seed_worklist<'tcx>(
|
|||
.map
|
||||
.iter()
|
||||
.filter_map(
|
||||
|(&id, level)| {
|
||||
if level >= &privacy::AccessLevel::Reachable { Some(id) } else { None }
|
||||
|(&id, &level)| {
|
||||
if level >= privacy::AccessLevel::Reachable { Some(id) } else { None }
|
||||
},
|
||||
)
|
||||
.chain(
|
||||
|
@ -547,7 +547,7 @@ impl DeadVisitor<'tcx> {
|
|||
let def_id = self.tcx.hir().local_def_id(id);
|
||||
let inherent_impls = self.tcx.inherent_impls(def_id);
|
||||
for &impl_did in inherent_impls.iter() {
|
||||
for &item_did in &self.tcx.associated_item_def_ids(impl_did)[..] {
|
||||
for item_did in self.tcx.associated_item_def_ids(impl_did) {
|
||||
if let Some(did) = item_did.as_local() {
|
||||
let item_hir_id = self.tcx.hir().local_def_id_to_hir_id(did);
|
||||
if self.live_symbols.contains(&item_hir_id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue