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

Conversation

0urobor0s
Copy link

Fixes #61592

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ollie27 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2020
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 21, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
src/test/rustdoc/issue-61592.rs Outdated Show resolved Hide resolved
@jyn514 jyn514 assigned jyn514 and unassigned ollie27 Dec 21, 2020
@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 21, 2020
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

compiler/rustc_error_codes/src/error_codes/E0780.md Outdated Show resolved Hide resolved
compiler/rustc_error_codes/src/error_codes/E0780.md Outdated Show resolved Hide resolved
compiler/rustc_error_codes/src/error_codes/E0780.md Outdated Show resolved Hide resolved
src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
if pub_underscore && inlined {
rustc_errors::struct_span_err!(
cx.tcx.sess,
self.attrs.lists(sym::doc).next().unwrap().span(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be wrong if there are multiple doc attributes. Can you add a test case for

#[doc = "xxx"]
#[doc(inline)]
pub use foo::Foo as _;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was working as is, maybe because of https://github.com/rust-lang/rust/blob/master/compiler/rustc_ast/src/ast.rs#L496.
Just to be safe it was changed and made some other refactoring to use the previous calculated values.

@rust-log-analyzer

This comment has been minimized.

src/librustdoc/clean/mod.rs Outdated Show resolved Hide resolved
compiler/rustc_error_codes/src/error_codes/E0780.md Outdated Show resolved Hide resolved
compiler/rustc_error_codes/src/error_codes/E0780.md Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@jyn514
Copy link
Member

jyn514 commented Dec 30, 2020

@bors r+ squash

@bors
Copy link
Contributor

bors commented Dec 30, 2020

📌 Commit 1990713 has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 30, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Dec 31, 2020
Rustdoc render public underscore_imports as Re-exports

Fixes rust-lang#61592
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 31, 2020
Rustdoc render public underscore_imports as Re-exports

Fixes rust-lang#61592
@bors
Copy link
Contributor

bors commented Dec 31, 2020

⌛ Testing commit 1990713 with merge a6bd524...

@bors
Copy link
Contributor

bors commented Dec 31, 2020

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing a6bd524 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 31, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 31, 2020

Oh right, I forgot that squash breaks github 🤦 don't worry, your changes have been merged: a6bd524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustdoc rendering of underscore_imports a.k.a. impl-only-use is unuseful
7 participants