-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add GlobalAsm as a valid ItemKind to StableMIR #138025
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
Conversation
This fixes StableMIR crash when iterating over the items of a crate that contains global assembly.
This actually technically conflicts with #137502, which removes global_asm
from the mir_keys
, and which indirectly fixes the ICE in rust-lang/project-stable-mir#95.
They shouldn't have been there in the first place, but also the fn all_local_items()
function is a bit unclear; it should probably be listing global asm items too, and possibly items without bodies like structs. I think it shouldn't be piggybacking off of the mir_keys
query at all, but iterating over some other set of local def ids and filtering those out based off of their DefKind
.
Could you please wait until #137502 is landed? Then please adjust the fn all_local_items()
to be more clear about what kinds of items it's returning 🤔 happy to chat about that if you want to work that design part out.
@rustbot blocked
@compiler-errors let's chat about the kinds of items you think we should return here, and the best way to implement that. This is today one of the main entry points to StableMir.
I'm also considering adding a stable API to get the results from rustc's collector, likely without the cgu part.
☔ The latest upstream changes (presumably #139417) made this pull request unmergeable. Please resolve the merge conflicts.
Per conversation in rust-lang/rust#138025, [another PR](rust-lang/rust#137502) resolved this issue upstream. Resolves #3919 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
@celinval any updates on this? thanks
Not yet. I'll pick this back up next week after rustconf.
This fixes StableMIR crash when iterating over the items of a crate that contains global assembly.
Fixes rust-lang/project-stable-mir#95