-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: don't hide anonymous reexport #108936
Rustdoc: don't hide anonymous reexport #108936
Conversation
Maybe this should only consider traits. Re-exporting anything but a trait as Or maybe re-exporting anything but a trait as |
I approve both suggestions (only for traits and the compiler warning). |
The reference says https://doc.rust-lang.org/reference/items/use-declarations.html#underscore-imports
So crates might also have an effect, but which? Together with This should be in a separate PR in any case, and in either case should probably also get some documentation updates so the behaviour of it for non-trait items is actually clear. |
I would prefer not to do anything more complicated here than we have to:
|
I'm fine with this approach too. If so, the current PR is ready then. |
@bors r+ rollup |
📌 Commit 76480e834611536d8b5797740fb6c25f586b0b0a has been approved by It is now in the queue for this repository. |
76480e8
to
9b788da
Compare
Huh, yeah, thanks for catching that. @bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#108879 (Unconstrained terms should account for infer vars being equated) - rust-lang#108936 (Rustdoc: don't hide anonymous reexport) - rust-lang#108940 (Add myself to compiler reviewers list) - rust-lang#108945 (Make some report and emit errors take DefIds instead of BodyIds) - rust-lang#108946 (Document the resulting values produced when using `From<bool>` on floats) - rust-lang#108956 (Make ptr::from_ref and ptr::from_mut in rust-lang#106116 const.) - rust-lang#108960 (Remove `body_def_id` from `Inherited`) - rust-lang#108963 (only call git on git checkouts during bootstrap) - rust-lang#108964 (Fix the docs for pointer method with_metadata_of) Failed merges: - rust-lang#108950 (Directly construct Inherited in typeck.) r? `@ghost` `@rustbot` modify labels: rollup
…eexport-lint, r=cjgillot Add `useless_anonymous_reexport` lint This is a follow-up of rust-lang#108936. We once again show all anonymous re-exports in rustdoc, however we also wanted to add a lint to let users know that it very likely doesn't have the effect they think it has.
Fixes #108931.
From #108931, it appears that having anonymous re-exports for traits is actually used in some places, so instead of hiding them automatically, we should prevent them to be ever inlined.
r? @notriddle