-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Delete Rvalue::Len
🎉
#134330
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
Delete Rvalue::Len
🎉
#134330
Conversation
// actual = len(place) | ||
self.cfg.push_assign(block, source_info, actual, Rvalue::Len(place)); | ||
let actual = self.len_of_slice_or_array(block, place, test.span, source_info); |
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.
One functional change here, reusing this helper from #133734
mir! { | ||
{ | ||
let x = [5_i32; C]; | ||
let c = Len(x); |
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.
This was here testing the custom-mir Len
, which is removed here, so I deleted the test.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
761e299
to
db4e734
Compare
☔ The latest upstream changes (presumably #134332) made this pull request unmergeable. Please resolve the merge conflicts. |
db4e734
to
cb58432
Compare
This comment has been minimized.
This comment has been minimized.
Everything's moved to `PtrMetadata` instead.
cb58432
to
29889fd
Compare
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
Discussion of this was here for anyone wondering: https://rust-lang.zulipchat.com/#narrow/channel/189540-t-compiler.2Fwg-mir-opt/topic/.60RValue.3A.3ALen.60.20vs.20.60UnOp.3A.3APtrMetadata.60 @bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
Everything's moved to
PtrMetadata
, so we can get rid of theLen
variant now.Depends on #134326, so draft until that landsReady!r? mir