about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-28 14:17:54 +0000
committerbors <bors@rust-lang.org>2025-01-28 14:17:54 +0000
commitfdd1a3b02687817cea41f6bacae3d5fbed2b2cd0 (patch)
treeb4856af437b6e5e31008d52230bfe3e45bb164ad /compiler/rustc_codegen_ssa/src
parentaa6f5ab18e67cb815f73e0d53d217bc54b0da924 (diff)
parent9a192b254cb25dd2b75274ee0d0d831c3ddb8220 (diff)
downloadrust-fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0.tar.gz
rust-fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0.zip
Auto merge of #136185 - matthiaskrgr:rollup-zqzy6wb, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #133151 (Trim extra whitespace in fn ptr suggestion span)
 - #133829 (Implement `AtomicT::update` & `AtomicT::try_update`)
 - #135367 (Enable `unreachable_pub` lint in `alloc`)
 - #135748 (Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸)
 - #135805 (Add missing allocator safety in alloc crate)
 - #135886 (Document purpose of closure in from_fn.rs more clearly)
 - #135961 (Fix 2/4 tests skipped by opt-dist)
 - #136012 (Document powf and powi values that are always 1.0)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index e775d219c7b..d7fc5e8e673 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -612,9 +612,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
             mir::Rvalue::CopyForDeref(place) => {
                 self.codegen_operand(bx, &mir::Operand::Copy(place))
             }
-            mir::Rvalue::RawPtr(mutability, place) => {
-                let mk_ptr =
-                    move |tcx: TyCtxt<'tcx>, ty: Ty<'tcx>| Ty::new_ptr(tcx, ty, mutability);
+            mir::Rvalue::RawPtr(kind, place) => {
+                let mk_ptr = move |tcx: TyCtxt<'tcx>, ty: Ty<'tcx>| {
+                    Ty::new_ptr(tcx, ty, kind.to_mutbl_lossy())
+                };
                 self.codegen_place_to_pointer(bx, place, mk_ptr)
             }