Skip to content

Commit 2ba883c

Browse files
authored
Merge pull request rust-lang#107 from canndrew/rename_map_hir
TyCtxt's map renamed to hir
2 parents b490a40 + 1752af6 commit 2ba883c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/miri.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
8383
fn visit_item(&mut self, i: &'hir hir::Item) {
8484
if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node {
8585
if i.attrs.iter().any(|attr| attr.value.name == "test") {
86-
let did = self.1.map.body_owner_def_id(body_id);
87-
println!("running test: {}", self.1.map.def_path(did).to_string(self.1));
86+
let did = self.1.hir.body_owner_def_id(body_id);
87+
println!("running test: {}", self.1.hir.def_path(did).to_string(self.1));
8888
miri::eval_main(self.1, did, self.0);
8989
self.2.session.abort_if_errors();
9090
}
@@ -96,7 +96,7 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
9696
state.hir_crate.unwrap().visit_all_item_likes(&mut Visitor(limits, tcx, state));
9797
} else {
9898
if let Some((entry_node_id, _)) = *state.session.entry_fn.borrow() {
99-
let entry_def_id = tcx.map.local_def_id(entry_node_id);
99+
let entry_def_id = tcx.hir.local_def_id(entry_node_id);
100100
miri::eval_main(tcx, entry_def_id, limits);
101101

102102
state.session.abort_if_errors();

src/step.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for ConstantExtractor<'a, 'b, 'tcx> {
225225
if let mir::Lvalue::Static(def_id) = *lvalue {
226226
let substs = self.ecx.tcx.intern_substs(&[]);
227227
let span = self.span;
228-
if let Some(node_item) = self.ecx.tcx.map.get_if_local(def_id) {
228+
if let Some(node_item) = self.ecx.tcx.hir.get_if_local(def_id) {
229229
if let hir::map::Node::NodeItem(&hir::Item { ref node, .. }) = node_item {
230230
if let hir::ItemStatic(_, m, _) = *node {
231231
self.global_item(def_id, substs, span, m == hir::MutImmutable);

0 commit comments

Comments
 (0)