1
Fork 0

use the item path printer that prints user friendly textual paths

This commit is contained in:
Oliver Schneider 2016-06-29 17:07:05 +02:00
parent 87306f1c2d
commit ae3c49a9e5
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46
2 changed files with 2 additions and 3 deletions

View file

@ -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 => {
@ -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());

View file

@ -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();