-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Turn ProjectionElem::Subtype into CastKind::Subtype #147055
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
Turn ProjectionElem::Subtype into CastKind::Subtype #147055
Conversation
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes rustc_public cc @oli-obk, @celinval, @ouz-a Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred to the CTFE machinery This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @vakaras Some changes occurred in compiler/rustc_codegen_ssa Some changes occurred to constck cc @fee1-dead |
Failed to set assignee to
|
r? lcnr (sorry, I got your name wrong 😅) |
This comment has been minimized.
This comment has been minimized.
37be44c
to
0132f5e
Compare
This comment has been minimized.
This comment has been minimized.
0132f5e
to
aa5a214
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls fix clippy in CI, r=me after
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
Hooray? I am a little scared because I have no idea how I actually fixed this. Maybe I accidentally turned off a check or something and this should keep ICEing.. |
also slightly minimized the test
This PR changes a file inside |
Nope, it's not fixed, it just requires |
@rustbot ready |
let f: F = 0u32; | ||
|
||
1 | ||
}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that change seems odd, why remove the async
blocks here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While investigating, I saw on the issue page that the async blocks are actually not part of the bug. I can split that into a different PR if you'd like.
@bors r+ rollup=never |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 3369e82 (parent) -> 42b384e (this PR) Test differencesShow 16 test diffs16 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 42b384ec0dfcd528d99a4db0a337d9188a9eecaa --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (42b384e): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary 2.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.8%, secondary 2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 472.027s -> 471.941s (-0.02%) |
Relevant upstream PR: - rust-lang/rust#147055 (Turn ProjectionElem::Subtype into CastKind::Subtype) Resolves: model-checking#4392
Relevant upstream PR: - rust-lang/rust#147055 (Turn ProjectionElem::Subtype into CastKind::Subtype) Resolves: #4392 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.
perf triage:
@rustbot label: +perf-regression-triaged |
…tion, r=lcnr Turn ProjectionElem::Subtype into CastKind::Subtype I noticed that drop elaboration can't, in general, handle `ProjectionElem::SubType`. It creates a disjoint move path that overlaps with other move paths. (`Subslice` does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent then `MovePath.place` has multiple possible projections. (It would probably make sense to remove all `Subtype` projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.) The only reason this doesn't break is that `Subtype` is always the sole projection of the local its applied to. For the same reason, it works fine as a `CastKind` so I figured that makes more sense than documenting and validating this hidden invariant. cc rust-lang#112651, rust-lang#133258 r? Icnr (bc you've been the main person dealing with `Subtype` it looks like)
I noticed that drop elaboration can't, in general, handle
ProjectionElem::SubType
. It creates a disjoint move path that overlaps with other move paths. (Subslice
does too, and I'm working on a different PR to make that special case less fragile.) If its skipped and treated as the same move path as its parent thenMovePath.place
has multiple possible projections. (It would probably make sense to remove allSubtype
projections for the canonical place but it doesn't make sense to have this special case for a problem that doesn't actually occur in real MIR.)The only reason this doesn't break is that
Subtype
is always the sole projection of the local its applied to. For the same reason, it works fine as aCastKind
so I figured that makes more sense than documenting and validating this hidden invariant.cc #112651, #133258
r? Icnr (bc you've been the main person dealing with
Subtype
it looks like)