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: avoid inlining items with duplicate (type, name) #99344

Merged

Conversation

notriddle
Copy link
Contributor

Fixes #99221

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 16, 2022
@rust-highfive
Copy link
Collaborator

r? @jsha

(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 Jul 16, 2022
@notriddle notriddle changed the title rustdoc: avoid inlining macros with duplicate names rustdoc: avoid inlining items with duplicate names Jul 16, 2022
@rust-log-analyzer

This comment has been minimized.

@notriddle notriddle force-pushed the notriddle/multiple-macro-rules-w-same-name branch from 5028d98 to 8bc4099 Compare July 16, 2022 23:54
@notriddle notriddle changed the title rustdoc: avoid inlining items with duplicate names rustdoc: avoid inlining items with duplicate (type, name) Jul 16, 2022
@notriddle notriddle force-pushed the notriddle/multiple-macro-rules-w-same-name branch from 8bc4099 to c822183 Compare July 17, 2022 00:04
@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 18, 2022

📌 Commit c822183 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Jul 18, 2022
Comment on lines +61 to +65
// 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.
Copy link
Member

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

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 18, 2022
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
@bors bors merged commit affdcd6 into rust-lang:master Jul 18, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 18, 2022
@notriddle notriddle deleted the notriddle/multiple-macro-rules-w-same-name branch July 19, 2022 00:05
@Mark-Simulacrum Mark-Simulacrum added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 19, 2022
@apiraino
Copy link
Contributor

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

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 20, 2022
@ehuss ehuss removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 22, 2022
@ehuss ehuss modified the milestones: 1.64.0, 1.63.0 Jul 22, 2022
ehuss pushed a commit to ehuss/rust that referenced this pull request Jul 22, 2022
…rules-w-same-name, r=GuillaumeGomez

rustdoc: avoid inlining items with duplicate `(type, name)`

Fixes rust-lang#99221
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 22, 2022
[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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: cargo +nightly doc panics when documenting a library that re-export std