mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
use the item path printer that prints user friendly textual paths
This commit is contained in:
@@ -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,4 +1,4 @@
|
||||
//error-pattern: no mir for `std
|
||||
//error-pattern: no mir for `std::env::args`
|
||||
|
||||
fn main() {
|
||||
let x = std::env::args();
|
||||
|
||||
Reference in New Issue
Block a user