diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs index b0b55a76e266e..020d6f80c595d 100644 --- a/src/librustdoc/visit_ast.rs +++ b/src/librustdoc/visit_ast.rs @@ -189,8 +189,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { } hir::ViewPathList(p, paths) => { let mine = paths.into_iter().filter(|path| { - !self.maybe_inline_local(path.node.id(), None, false, om, - please_inline) + !self.maybe_inline_local(path.node.id(), path.node.rename(), + false, om, please_inline) }).collect::>(); if mine.is_empty() { diff --git a/src/test/rustdoc/issue-34473.rs b/src/test/rustdoc/issue-34473.rs new file mode 100644 index 0000000000000..a6de638854f65 --- /dev/null +++ b/src/test/rustdoc/issue-34473.rs @@ -0,0 +1,22 @@ +// Copyright 2016 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. + +#![crate_name = "foo"] + +mod second { + pub struct SomeTypeWithLongName; +} + +// @has foo/index.html +// @!has - SomeTypeWithLongName +// @has foo/struct.SomeType.html +// @!has - SomeTypeWithLongName +// @!has foo/struct.SomeTypeWithLongName.html +pub use second::{SomeTypeWithLongName as SomeType};