-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: avoid inlining items with duplicate (type, name)
#99344
rustdoc: avoid inlining items with duplicate (type, name)
#99344
Conversation
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
5028d98
to
8bc4099
Compare
(type, name)
8bc4099
to
c822183
Compare
Thanks! @bors r+ |
// Split up imports from all other items. | ||
// | ||
// This covers the case where somebody does an import which should pull in an item, | ||
// but there's already an item with the same namespace and same name. Rust gives | ||
// priority to the not-imported one, so we should, too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest mentioning this is specifically about glob imports. For normal imports, the resolver gives an error that you have duplicate items: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=130848897ca4a33ebafad5fa75ae8884
error[E0255]: the name `S` is defined multiple times
Rollup of 7 pull requests Successful merges: - rust-lang#98839 (Add assertion that `transmute_copy`'s U is not larger than T) - rust-lang#98998 (Remove branch target prologues from `#[naked] fn`) - rust-lang#99198 (add missing null ptr check in alloc example) - rust-lang#99344 (rustdoc: avoid inlining items with duplicate `(type, name)`) - rust-lang#99351 (Use `typeck_results` to get accurate qpath res for arg mismatch error) - rust-lang#99378 (interpret/visitor: add missing early return) - rust-lang#99394 (Add regression test for rust-lang#95230) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I'll go ahead and expedite "approve" the beta. As discussed in a past T-compiler meeting (Zulip notes), these small T-rustdoc changes don't probably need them to approve. Let me know if I am overlooking any established procedures :) @rustbot label +beta-accepted |
…rules-w-same-name, r=GuillaumeGomez rustdoc: avoid inlining items with duplicate `(type, name)` Fixes rust-lang#99221
[beta] Beta 1.63 backports * Reference: Revert $$ macro_metavar rust-lang/reference#1192 * Revert "Stabilize $$ in Rust 1.63.0" rust-lang#99435 * rustdoc: avoid inlining items with duplicate `(type, name)` rust-lang#99344 * Do not call `check_expr` twice in `check_compatible` rust-lang#99397
Fixes #99221