Skip to content

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Aug 16, 2022

Closes #100531

r? @GuillaumeGomez

@rustbot labels +A-rustdoc-json +T-rustdoc

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 16, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 16, 2022
@rustbot rustbot added the A-rustdoc-json Area: Rustdoc JSON backend label Aug 16, 2022
| types::ItemEnum::AssocConst { .. }
| types::ItemEnum::AssocType { .. }
| types::ItemEnum::PrimitiveType(_) => true,
types::ItemEnum::Module(_)
| types::ItemEnum::ExternCrate { .. }
types::ItemEnum::ExternCrate { .. }
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised, I thought that the ExternCrate was the issue. Oh well. Code is always surprising. :)

@Urgau
Copy link
Member

Urgau commented Aug 16, 2022

I'm still concern about this can_be_ignored logic which just hides the problem. We should try to find a proper way to fix those issues.

@GuillaumeGomez
Copy link
Member

The underlying issue is reexport which bring same IDs into a same scope. We improved the problem recently thanks to #99287. But we still have the issue of the reexport renaming of an item in the current scope.

@Urgau
Copy link
Member

Urgau commented Aug 16, 2022

Oh I see, here we have a Import item and a Module and both are renamed, which cause the assertion to trigger. In that case LGTM.

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Aug 16, 2022

The world (well, at least rustdoc) would very likely be much better if reexports weren't a thing. 🤣

@GuillaumeGomez
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 16, 2022

📌 Commit dbeb506 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 Aug 16, 2022
@Enselic
Copy link
Member Author

Enselic commented Aug 16, 2022

Thanks for review! Probably good to rollup though?

@GuillaumeGomez
Copy link
Member

It can still be put in a rollup even if the priority hasn't been set to rollup. But in this case I think it's safe to just put it always in the rollup.

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 16, 2022
Rollup of 4 pull requests

Successful merges:

 - rust-lang#100243 (Remove opt_remap_env_constness from rustc_query_impl)
 - rust-lang#100625 (Add `IpDisplayBuffer` helper struct.)
 - rust-lang#100629 (Use `merged_ty` method instead of rewriting it every time)
 - rust-lang#100630 (rustdoc JSON: Fix ICE with `pub extern crate self as <self_crate_name>`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit af74e72 into rust-lang:master Aug 16, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 16, 2022
@Enselic Enselic deleted the export_extern_crate_as_self branch August 17, 2022 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend 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 JSON ICE with pub extern crate self as <self_crate_name>
6 participants