diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-12-19 12:31:35 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-03-15 13:25:10 +0200 |
| commit | e0c75ff40def45bbf39bfed5766a1a8a56f2409f (patch) | |
| tree | 2481a8ecd209948f09dcd09f1e012a968c1bd88c /src/librustc/mir | |
| parent | f1af5a77a00225bec61c0ae7218031123364b619 (diff) | |
| download | rust-e0c75ff40def45bbf39bfed5766a1a8a56f2409f.tar.gz rust-e0c75ff40def45bbf39bfed5766a1a8a56f2409f.zip | |
rustc: rename item_path to def_path (except the module in ty).
Diffstat (limited to 'src/librustc/mir')
| -rw-r--r-- | src/librustc/mir/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index ec42809ff65..ea3668cec15 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -2062,7 +2062,7 @@ impl<'tcx> Debug for Place<'tcx> { Base(PlaceBase::Static(box self::Static { def_id, ty })) => write!( fmt, "({}: {:?})", - ty::tls::with(|tcx| tcx.item_path_str(def_id)), + ty::tls::with(|tcx| tcx.def_path_str(def_id)), ty ), Base(PlaceBase::Promoted(ref promoted)) => write!( @@ -2731,7 +2731,7 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: ty::Const<'_>) -> fmt::Resul } // print function definitions if let FnDef(did, _) = ty.sty { - return write!(f, "{}", item_path_str(did)); + return write!(f, "{}", def_path_str(did)); } // print string literals if let ConstValue::Slice(ptr, len) = value { @@ -2756,8 +2756,8 @@ pub fn fmt_const_val(f: &mut impl Write, const_val: ty::Const<'_>) -> fmt::Resul write!(f, "{:?}:{}", value, ty) } -fn item_path_str(def_id: DefId) -> String { - ty::tls::with(|tcx| tcx.item_path_str(def_id)) +fn def_path_str(def_id: DefId) -> String { + ty::tls::with(|tcx| tcx.def_path_str(def_id)) } impl<'tcx> graph::DirectedGraph for Mir<'tcx> { |
