about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-14 07:36:57 +0200
committerGitHub <noreply@github.com>2019-10-14 07:36:57 +0200
commit2800bc240e1f4789bb54080b4cd30ec382a1337f (patch)
tree096134e6e2b215f002d35e23368efb172be0f076 /src/librustdoc/html/render.rs
parent66e428824b133078faa187b1f6f0546e2211de16 (diff)
parentab8105ee9703882534203237b3a6494842d65a75 (diff)
downloadrust-2800bc240e1f4789bb54080b4cd30ec382a1337f.tar.gz
rust-2800bc240e1f4789bb54080b4cd30ec382a1337f.zip
Rollup merge of #65363 - Centril:less-pprust, r=Mark-Simulacrum
Remove implicit dependencies on syntax::pprust

Part of https://github.com/rust-lang/rust/pull/65324.

The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer.

r? @estebank
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 1ff71a0024b..b726ad1e0d6 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -46,6 +46,7 @@ use serialize::json::{ToJson, Json, as_json};
 use syntax::ast;
 use syntax::edition::Edition;
 use syntax::ext::base::MacroKind;
+use syntax::print::pprust;
 use syntax::source_map::FileName;
 use syntax::feature_gate::UnstableFeatures;
 use syntax::symbol::{Symbol, sym};
@@ -2957,7 +2958,7 @@ fn item_enum(w: &mut Buffer, cx: &Context, it: &clean::Item, e: &clean::Enum) {
 }
 
 fn render_attribute(attr: &ast::MetaItem) -> Option<String> {
-    let path = attr.path.to_string();
+    let path = pprust::path_to_string(&attr.path);
 
     if attr.is_word() {
         Some(path)