diff options
| author | bors <bors@rust-lang.org> | 2025-03-16 02:02:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-16 02:02:45 +0000 |
| commit | 66678e68227913a42438afc7320a2849dffd4d51 (patch) | |
| tree | 53b60463906a2137e02ed8fc2c56528b1710ae11 /compiler/rustc_mir_transform/src | |
| parent | 9f274ba3997030a2b7656755a6810fd26cb709f3 (diff) | |
| parent | f4372f5d121d2b2a8aa39b432aeef7127e17497f (diff) | |
| download | rust-66678e68227913a42438afc7320a2849dffd4d51.tar.gz rust-66678e68227913a42438afc7320a2849dffd4d51.zip | |
Auto merge of #138548 - jieyouxu:rollup-xpslct5, r=jieyouxu
Rollup of 16 pull requests
Successful merges:
- #133055 (Expand `CloneToUninit` documentation.)
- #137147 (Add exclude to config.toml)
- #137864 (Don't drop `Rvalue::WrapUnsafeBinder` during GVN)
- #137890 (doc: clarify that consume can be called after BufReader::peek)
- #137956 (Add RTN support to rustdoc)
- #137968 (Properly escape regexes in Python scripts)
- #138082 (Remove `#[cfg(not(test))]` gates in `core`)
- #138275 (expose `is_s390x_feature_detected!` from `std::arch`)
- #138303 (Fix Ptr inconsistency in {Rc,Arc})
- #138309 (Add missing doc for intrinsic (Fix PR135334))
- #138323 (Expand and organize `offset_of!` documentation.)
- #138329 (debug-assert that the size_hint is well-formed in `collect`)
- #138465 (linkchecker: bump html5ever)
- #138471 (Clean up some tests in tests/ui)
- #138472 (Add codegen test for #129795)
- #138484 (Use lit span when suggesting suffix lit cast)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/gvn.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/gvn.rs b/compiler/rustc_mir_transform/src/gvn.rs index 981dedd5b5c..0a54c780f31 100644 --- a/compiler/rustc_mir_transform/src/gvn.rs +++ b/compiler/rustc_mir_transform/src/gvn.rs @@ -872,8 +872,14 @@ impl<'body, 'tcx> VnState<'body, 'tcx> { self.simplify_place_projection(place, location); return self.new_pointer(*place, AddressKind::Address(mutbl)); } - Rvalue::WrapUnsafeBinder(ref mut op, _) => { - return self.simplify_operand(op, location); + Rvalue::WrapUnsafeBinder(ref mut op, ty) => { + let value = self.simplify_operand(op, location)?; + Value::Cast { + kind: CastKind::Transmute, + value, + from: op.ty(self.local_decls, self.tcx), + to: ty, + } } // Operations. |
