Ensure nested statics have a HIR node to prevent various queries from ICEing by...
source link: https://github.com/rust-lang/rust/pull/122719
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Collaborator
r? @fee1-dead rustbot has assigned @fee1-dead. Use r? to explicitly pick a reviewer |
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.
labels
Collaborator
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri The Miri subtree was changed cc @rust-lang/miri |
Member
Does that test repo the issue? The reporter wrote
…
|
Contributor
Author
oh fun. I didn't check. |
Contributor
Author
I removed the test. The change is useful on its own. We should always have HIR available for all |
Member
Will this also fix the codegen ICEs related to nested statics?
|
Contributor
Author
no, this PR just makes better ICEs |
@@ -3531,7 +3526,8 @@ pub enum Node<'hir> { | ||
WhereBoundPredicate(&'hir WhereBoundPredicate<'hir>), |
||
// FIXME: Merge into `Node::Infer`. |
||
ArrayLenInfer(&'hir InferArg), |
||
AssocOpaqueTy(&'hir AssocOpaqueTy), |
||
// Created by query feeding |
||
Synthetic, |
Contributor
Author
I can give it a field where we can encode the kind of synthetic node that we have here. Then it can be handled the same everywhere and get custom handling where desirable
We usually can get this information by asking for the DefId
and then the DefKind
, but that's not always immediately there I guess
LGTM. FWIW, I don't think it is necessary to add any info that distinguishes nested statics from associated types coming from RPITITs, since the def_kind
already has it, and we rarely print the HIR after the queries are fed.
Contributor
Author
@bors r=fee1-dead I'll revisit when we have an actual ICE where it isn't obvious from the query stack already |
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK