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

Prevent crash when a path is not resolved in intra-doc link #111195

Merged
merged 2 commits into from
May 24, 2023

Conversation

GuillaumeGomez
Copy link
Member

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 4, 2023
@GuillaumeGomez GuillaumeGomez marked this pull request as draft May 4, 2023 13:08
@jyn514 jyn514 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 May 4, 2023
@GuillaumeGomez GuillaumeGomez marked this pull request as ready for review May 6, 2023 14:59
@GuillaumeGomez
Copy link
Member Author

So the problem was that rustfmt and clippy ident are actually specially handled by rustc and have their own Res. So ignoring these Res fixes the issue and add the needed parts into the paths queried by rustdoc.

@petrochenkov
Copy link
Contributor

r? @petrochenkov
Didn't notice the ping previously.

@rustbot rustbot assigned petrochenkov and unassigned notriddle May 6, 2023
@GuillaumeGomez
Copy link
Member Author

Which is a good thing. The previous version was a lazy fix from my end. Now it's ready.

@GuillaumeGomez GuillaumeGomez 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 May 12, 2023
@petrochenkov
Copy link
Contributor

@GuillaumeGomez
Could you use the patch from petrochenkov@721c695?
It basically does the same thing (collects some more prefixes for rustdoc diagnostics), but moves the special case from resolve_and_cache_rustdoc_path to resolve_doc_links.
@rustbot author

@rustbot rustbot 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 May 12, 2023
@GuillaumeGomez
Copy link
Member Author

I applied your patch @petrochenkov.

@GuillaumeGomez GuillaumeGomez 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 May 23, 2023
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 23, 2023

📌 Commit bcdfda1 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 May 23, 2023
@bors
Copy link
Contributor

bors commented May 24, 2023

⌛ Testing commit bcdfda1 with merge d69787f...

@bors
Copy link
Contributor

bors commented May 24, 2023

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing d69787f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 24, 2023
@bors bors merged commit d69787f into rust-lang:master May 24, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 24, 2023
@GuillaumeGomez GuillaumeGomez deleted the fix-ice-intra-doc-link branch May 24, 2023 11:26
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d69787f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
4.7% [4.7%, 4.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 647.271s -> 647.352s (0.01%)

altaua pushed a commit to paritytech/polkadot that referenced this pull request Jun 15, 2023
Documenting our code triggers an ICE in rust 1.70, presumably the one
fixed here: rust-lang/rust#111195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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 crash: no resolution for "rustfmt" TypeNS DefId(0:0 ~ bb[cfb9])
7 participants