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
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -236,7 +236,6 @@ fn type_is_sized(&self, ty: Ty<'tcx>) -> bool {
}
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 @@ fn load_mir(&self, def_id: DefId) -> CachedMir<'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());
+1 -1
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();