about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2018-12-28 06:09:22 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2019-03-15 13:25:10 +0200
commitdf6650f38cb2bed40fb1b1fe5d6a6e08dab963e2 (patch)
tree191436e32bb20c36daf53c6cae291d07d6d4ea96 /src/librustdoc
parent39fd54a418b08051623505ff5263fe8714f40b4c (diff)
downloadrust-df6650f38cb2bed40fb1b1fe5d6a6e08dab963e2.tar.gz
rust-df6650f38cb2bed40fb1b1fe5d6a6e08dab963e2.zip
rustc: move `...::<impl ...>` printing into `pretty_path_qualified`.
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/clean/mod.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 4cc18125e04..bfc7c7859f5 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -4237,16 +4237,21 @@ where F: Fn(DefId) -> Def {
         }
         fn path_qualified(
             self: &mut PrintCx<'_, '_, 'tcx, Self>,
+            impl_prefix: Option<Self::Path>,
             self_ty: Ty<'tcx>,
             trait_ref: Option<ty::TraitRef<'tcx>>,
             _ns: Namespace,
         ) -> Self::Path {
+            let mut path = impl_prefix.unwrap_or(vec![]);
+
             // This shouldn't ever be needed, but just in case:
             if let Some(trait_ref) = trait_ref {
-                vec![format!("{:?}", trait_ref)]
+                path.push(format!("{:?}", trait_ref));
             } else {
-                vec![format!("<{}>", self_ty)]
+                path.push(format!("<{}>", self_ty));
             }
+
+            path
         }
         fn path_append(
             self: &mut PrintCx<'_, '_, '_, Self>,