Skip to content

Commit

Permalink
Merge pull request rust-lang#39 from oli-obk/can_you_read_me_now
Browse files Browse the repository at this point in the history
use the item path printer that prints user friendly textual paths
  • Loading branch information
solson authored Jun 29, 2016
2 parents 87306f1 + ae3c49a commit d309ab7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
}

fn load_mir(&self, def_id: DefId) -> CachedMir<'a, 'tcx> {
use rustc_trans::back::symbol_names::def_id_to_string;
match self.tcx.map.as_local_node_id(def_id) {
Some(node_id) => CachedMir::Ref(self.mir_map.map.get(&node_id).unwrap()),
None => {
Expand All @@ -247,7 +246,7 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {

let cs = &self.tcx.sess.cstore;
let mir = cs.maybe_get_item_mir(self.tcx, def_id).unwrap_or_else(|| {
panic!("no mir for `{}`", def_id_to_string(self.tcx, def_id));
panic!("no mir for `{}`", self.tcx.item_path_str(def_id));
});
let cached = Rc::new(mir);
mir_cache.insert(def_id, cached.clone());
Expand Down
2 changes: 1 addition & 1 deletion tests/compile-fail/env_args.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//error-pattern: no mir for `std
//error-pattern: no mir for `std::env::args`

fn main() {
let x = std::env::args();
Expand Down

0 comments on commit d309ab7

Please sign in to comment.