about summary refs log tree commit diff
path: root/src/librustc/hir/map
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-10-04 14:57:14 +0200
committerMichael Woerister <michaelwoerister@posteo>2017-10-05 10:20:13 +0200
commitb50e8ebbba2c9f9f87ea6bc1fb47a8856999223c (patch)
treec6923949e5b5d4f05519737ceacbf79cc39dd5d2 /src/librustc/hir/map
parentbd36dcf7aa2c45b47fe102376222667b0a903c23 (diff)
downloadrust-b50e8ebbba2c9f9f87ea6bc1fb47a8856999223c.tar.gz
rust-b50e8ebbba2c9f9f87ea6bc1fb47a8856999223c.zip
Fix infinite recursion in <DepNode as Debug>.
Diffstat (limited to 'src/librustc/hir/map')
-rw-r--r--src/librustc/hir/map/definitions.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/librustc/hir/map/definitions.rs b/src/librustc/hir/map/definitions.rs
index bd80b613e77..8bc7cf2faba 100644
--- a/src/librustc/hir/map/definitions.rs
+++ b/src/librustc/hir/map/definitions.rs
@@ -27,7 +27,6 @@ use std::hash::Hash;
 use syntax::ast;
 use syntax::ext::hygiene::Mark;
 use syntax::symbol::{Symbol, InternedString};
-use ty::TyCtxt;
 use util::nodemap::NodeMap;
 
 /// The DefPathTable maps DefIndexes to DefKeys and vice versa.
@@ -296,26 +295,6 @@ impl DefPath {
         DefPath { data: data, krate: krate }
     }
 
-    pub fn to_string(&self, tcx: TyCtxt) -> String {
-        let mut s = String::with_capacity(self.data.len() * 16);
-
-        s.push_str(&tcx.original_crate_name(self.krate).as_str());
-        s.push_str("/");
-        // Don't print the whole crate disambiguator. That's just annoying in
-        // debug output.
-        s.push_str(&tcx.crate_disambiguator(self.krate).as_str()[..7]);
-
-        for component in &self.data {
-            write!(s,
-                   "::{}[{}]",
-                   component.data.as_interned_str(),
-                   component.disambiguator)
-                .unwrap();
-        }
-
-        s
-    }
-
     /// Returns a string representation of the DefPath without
     /// the crate-prefix. This method is useful if you don't have
     /// a TyCtxt available.