", id)?;
- fmt_impl_for_trait_page(&i.inner_impl(), w, use_absolute)?;
+ fmt_impl_for_trait_page(&i.inner_impl(), w, use_absolute, rename)?;
if show_def_docs {
for it in &i.inner_impl().items {
if let clean::TypedefItem(ref tydef, _) = it.inner {
@@ -3919,8 +3922,10 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
write!(w, " ")?;
} else {
write!(w, "\
- {} ",
- id, i.inner_impl())?;
+ | ",
+ id)?;
+ fmt_impl_renamed(i.inner_impl(), w, rename)?;
+ write!(w, " ")?;
}
write!(w, "", id)?;
write!(w, " | ")?;
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 4b043b26d8650..f7b621bd9428a 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -25,6 +25,7 @@
#![feature(crate_visibility_modifier)]
#![feature(const_fn)]
#![feature(drain_filter)]
+#![feature(inner_deref)]
#![recursion_limit="256"]
diff --git a/src/test/rustdoc/inline_local/rename.rs b/src/test/rustdoc/inline_local/rename.rs
new file mode 100644
index 0000000000000..c280d69678bbd
--- /dev/null
+++ b/src/test/rustdoc/inline_local/rename.rs
@@ -0,0 +1,24 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 or the MIT license
+// , at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod inner {
+ pub struct SomeStruct;
+
+ impl SomeStruct {
+ pub fn new() -> SomeStruct { SomeStruct }
+ }
+}
+
+// @has rename/index.html
+// @has - '//a/@href' 'struct.MyStruct.html'
+// @has rename/struct.MyStruct.html
+// @has - '//code' 'impl MyStruct'
+// @!has - '//code' 'impl SomeStruct'
+pub use inner::SomeStruct as MyStruct;
|
|