Skip to content

Conversation

bvanjoi
Copy link
Contributor

@bvanjoi bvanjoi commented Nov 16, 2024

Fixes #132743

The definition item can be detected if it is exported in the doc, so store these items rather than skipping.

r? @petrochenkov

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 16, 2024
@petrochenkov
Copy link
Contributor

How does this gets to an ICE?
The logic in fn resolve_and_cache_rustdoc_path tries to never resolve external doc links in proc macro crates.

@petrochenkov
Copy link
Contributor

Storing these def ids goes against our (likely?) general direction of making proc macro crates more isolated and less needed after macro expansion (#125721).
cc @bjorn3

@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 22, 2024

How does this gets to an ICE?

During the compilation of a proc macro crate, the fn resolve_and_cache_rustdoc_path records the information mod m {} because it is not considered an external crate.

However, when building the docs for current crate, it attempts to use the information mod m {}. This information is not actually stored, leading to a panic.

Storing these def ids goes against our (likely?) general direction of making proc macro crates more isolated and less needed after macro expansion

Following these principles, removing the check def.is_local might be a better solution.

@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 22, 2024

UPDATE: now it will only store the valid proc macro item

@bvanjoi bvanjoi changed the title store the defs in proc macro crate only store valid proc marco item for doc link Nov 22, 2024
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 22, 2024
@bvanjoi
Copy link
Contributor Author

bvanjoi commented Nov 23, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 23, 2024
@petrochenkov
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Nov 23, 2024

📌 Commit 30d68eb has been approved by petrochenkov

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 Nov 23, 2024
@compiler-errors compiler-errors changed the title only store valid proc marco item for doc link only store valid proc macro item for doc link Nov 24, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#132730 (std: allow after-main use of synchronization primitives)
 - rust-lang#133105 (only store valid proc macro item for doc link)
 - rust-lang#133260 (Constify the `Deref`/`DerefMut` traits, too)
 - rust-lang#133297 (Remove legacy bitcode for iOS)
 - rust-lang#133298 (Mention that std::fs::remove_dir_all fails on files)
 - rust-lang#133384 (add a test for target-feature-ABI warnings in closures and when calling extern fn)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6b07382 into rust-lang:master Nov 25, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2024
Rollup merge of rust-lang#133105 - bvanjoi:issue-132743, r=petrochenkov

only store valid proc macro item for doc link

Fixes rust-lang#132743

The definition item can be detected if it is exported in the doc, so store these items rather than skipping.

r? `@petrochenkov`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

ICE building Leptos 0.7.0 release candidate
5 participants