-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Don't use typeck_root_def_id
in codegen for finding closure's root
#129716
Conversation
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
0370d5f
to
ef2f5aa
Compare
I lack the necessary familiarity and context |
@cjgillot: Are you available to review this, or should I re-roll? |
I'll get to it this weekend, sorry for the delay. |
ef2f5aa
to
63405fc
Compare
@rustbot ready |
@bors r+ rollup |
☀️ Test successful - checks-actions |
Finished benchmarking commit (13b5a4e): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.6%, secondary -0.5%)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.
CyclesResults (primary 1.5%)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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 760.015s -> 759.454s (-0.07%) |
Generating debuginfo in codegen currently peels off all the closure-specific generics (which presumably is done because they're redundant). This doesn't currently work correctly for the bodies we synthesize for async closures's returned coroutines (#128506), leading to #129702.
Specifically,
typeck_root_def_id
for someDefKind::SyntheticCoroutineBody
just returns itself (because it loops whileis_typeck_child
istrue
, and that returnsfalse
for this defkind), which means we don't end up peeling off the coroutine-specific generics, and we end up encountering an otherwise unreachableCoroutineWitness
type leading to an ICE.This PR fixes
is_typeck_child
to considerDefKind::SyntheticCorotuineBody
to be a typeck child, fixingtypeck_root_def_id
and suppressing this debuginfo bug.Fixes #129702