Skip to content

Rollup of 5 pull requests #61915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 18, 2019
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
Prev Previous commit
Next Next commit
simplify ICE handling in HirIdValidator
  • Loading branch information
ljedrz committed Jun 17, 2019
commit 88961b049ec2e8dec3f7b1c8166fb201c0632bbe
12 changes: 0 additions & 12 deletions src/librustc/hir/map/hir_id_validator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::hir::def_id::{DefId, DefIndex, CRATE_DEF_INDEX};
use crate::hir::{self, intravisit, HirId, ItemLocalId};
use syntax::ast::NodeId;
use crate::hir::itemlikevisit::ItemLikeVisitor;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::sync::{Lock, ParallelIterator, par_iter};
Expand Down Expand Up @@ -112,17 +111,6 @@ impl<'a, 'hir: 'a> HirIdValidator<'a, 'hir> {

trace!("missing hir id {:#?}", hir_id);

// We are already in ICE mode here, so doing a linear search
// should be fine.
let (node_id, _) = self.hir_map
.definitions()
.node_to_hir_id
.iter()
.enumerate()
.find(|&(_, &entry)| hir_id == entry)
.expect("no node_to_hir_id entry");
let node_id = NodeId::from_usize(node_id);
let hir_id = self.hir_map.node_to_hir_id(node_id);
missing_items.push(format!("[local_id: {}, node:{}]",
local_id,
self.hir_map.node_to_string(hir_id)));
Expand Down