Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc render public underscore_imports as Re-exports #80267

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,8 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
}
None => false,
}
});
})
|| (self.vis.node.is_pub() && self.name == kw::Underscore);
jyn514 marked this conversation as resolved.
Show resolved Hide resolved
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
// crate in Rust 2018+
let please_inline = self.attrs.lists(sym::doc).has_word(sym::inline);
Expand Down
7 changes: 7 additions & 0 deletions src/test/rustdoc/issue-61592.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub mod foo {
pub struct Foo;
}

// @has issue_61592/index.html
// @has - '//*[@href="#reexports"]' 'Re-exports'
jyn514 marked this conversation as resolved.
Show resolved Hide resolved
pub use foo::Foo as _;