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 ICE for doc_alias on match arm, statement, expression #100029

Merged
merged 5 commits into from
Aug 4, 2022

Conversation

hdelc
Copy link
Contributor

@hdelc hdelc commented Aug 1, 2022

Fixes #99777.

This is a pretty minimal fix that should be safe, since rustdoc doesn't generate documentation for match arms, statements, or expressions. I mentioned in the linked issue that the doc_alias target checking should probably be improved to avoid future ICEs, but as a new contributor, I'm not confident enough with the HIR types to make a larger change.

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

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 1, 2022
@hdelc
Copy link
Contributor Author

hdelc commented Aug 2, 2022

The force-push was because I forgot to fix formatting. Whoops

Copy link
Contributor

@cjgillot cjgillot left a comment

Choose a reason for hiding this comment

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

Thanks @hdelc! A few remaining changes and that will be ready.
You don't have to explain force-push: we force-push PRs all the time, to rebase in case of merge conflict for instance.

compiler/rustc_passes/src/check_attr.rs Outdated Show resolved Hide resolved
compiler/rustc_hir/src/target.rs Outdated Show resolved Hide resolved
compiler/rustc_passes/src/check_attr.rs Outdated Show resolved Hide resolved
compiler/rustc_hir/src/target.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

- Added `Impl`, `Closure`, ForeignMod` targets
- `Target::name` changed for `Target::Impl`
- Error output for `Target::ForeignMod` changed to "foreign module"
@hdelc
Copy link
Contributor Author

hdelc commented Aug 3, 2022

Thanks for all the help! Hopefully these changes wrap it up

@cjgillot
Copy link
Contributor

cjgillot commented Aug 3, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Aug 3, 2022

📌 Commit 2be0094 has been approved by cjgillot

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 3, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 4, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#98771 (Add support for link-flavor rust-lld for iOS, tvOS and watchOS)
 - rust-lang#98835 (relate `closure_substs.parent_substs()` to parent fn in NLL)
 - rust-lang#99746 (Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`)
 - rust-lang#99786 (Recover from C++ style `enum struct`)
 - rust-lang#99795 (Delay a bug when failed to normalize trait ref during specialization)
 - rust-lang#100029 (Prevent ICE for `doc_alias` on match arm, statement, expression)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f8e6617 into rust-lang:master Aug 4, 2022
@rustbot rustbot added this to the 1.64.0 milestone Aug 4, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE when using the doc alias attribute on expr or local
6 participants