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

Do not print visibility in external traits #84832

Merged
merged 1 commit into from
May 3, 2021

Conversation

Stupremee
Copy link
Member

@Stupremee Stupremee commented May 2, 2021

This PR fixes the bug that caused traits, which were re-exported, having visibility modifiers in front of methods, which is invalid.

It would be nice to add a test for this, but I don't even know if tests with multiple crates are possible.

Resolves #81274

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 2, 2021
@Mark-Simulacrum
Copy link
Member

r? @jyn514

@jyn514 jyn514 added A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 2, 2021
@jyn514
Copy link
Member

jyn514 commented May 2, 2021

It would be nice to add a test for this, but I don't even know if tests with multiple crates are possible.

They are - search for aux-build and build-aux-docs in src/test/rustdoc (and there's also some instructions in https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#dotting-is-and-crossing-ts).

src/librustdoc/clean/inline.rs Outdated Show resolved Hide resolved
test.rs Outdated Show resolved Hide resolved
test.rs Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented May 2, 2021

Can you squash the commits? r=me with that done and CI passing :)

@Stupremee Stupremee force-pushed the dont-print-vis-in-external-traits branch from 95cdeb9 to 9ca6d58 Compare May 2, 2021 19:17
@Stupremee
Copy link
Member Author

@bors r=@jyn514

@bors
Copy link
Contributor

bors commented May 2, 2021

@Stupremee: 🔑 Insufficient privileges: Not in reviewers

@Stupremee
Copy link
Member Author

r? @jyn514

whoops

@jyn514
Copy link
Member

jyn514 commented May 2, 2021

@bors r+

@bors
Copy link
Contributor

bors commented May 2, 2021

📌 Commit 9ca6d58 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-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2021
Rollup of 6 pull requests

Successful merges:

 - rust-lang#84072 (Allow setting `target_family` to multiple values, and implement `target_family="wasm"`)
 - rust-lang#84744 (Add ErrorKind::OutOfMemory)
 - rust-lang#84784 (Add help message to suggest const for unused type param)
 - rust-lang#84811 (RustDoc: Fix bounds linking trait.Foo instead of traitalias.Foo)
 - rust-lang#84818 (suggestion for unit enum variant when matched with a patern)
 - rust-lang#84832 (Do not print visibility in external traits)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 83c49d0 into rust-lang:master May 3, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-crate-reexports Area: Documentation that has been re-exported from a different crate 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.

Wrong pub modifier in each function of trait documentation
6 participants