Skip to content

Fix ICE when using #[doc(keyword = "...")] on non-items #86401

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 18, 2021

Conversation

FabianWolff
Copy link
Contributor

This pull request fixes #83512. The code for checking attributes calls expect_item() when it shouldn't, thus causing an ICE. I have implemented a proper check for the node kind, so that an error is reported instead of the ICE.

@rust-highfive
Copy link
Contributor

r? @LeSeulArtichaut

(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 Jun 17, 2021
Copy link
Contributor

@LeSeulArtichaut LeSeulArtichaut left a comment

Choose a reason for hiding this comment

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

👍

@LeSeulArtichaut
Copy link
Contributor

Thanks! @bors r+

@bors
Copy link
Collaborator

bors commented Jun 17, 2021

📌 Commit e9e844f has been approved by LeSeulArtichaut

@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 Jun 17, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 17, 2021
Rollup of 6 pull requests

Successful merges:

 - rust-lang#85925 (Linear interpolation)
 - rust-lang#86202 (Specialize `io::Bytes::size_hint` for more types)
 - rust-lang#86357 (Rely on libc for correct integer types in os/unix/net/ancillary.rs.)
 - rust-lang#86388 (Make `s` pre-interned)
 - rust-lang#86401 (Fix ICE when using `#[doc(keyword = "...")]` on non-items)
 - rust-lang#86405 (Add incr-comp note for 1.53.0 relnotes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0274401 into rust-lang:master Jun 18, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 18, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: compiler/rustc_middle/src/hir/map/mod.rs:764:18: expected item, found trait method
5 participants