about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorMoulins <arthur.heuillard@orange.fr>2023-06-27 00:47:27 +0200
committerMoulins <arthur.heuillard@orange.fr>2023-07-21 03:31:46 +0200
commit403f34b599fb3ed7abd71f3388da3c5061a2d84f (patch)
tree2a1db4f1a57cc5c374a1888e92540c7c22ce3783 /compiler/rustc_codegen_gcc
parent4fb039ed6c069e0ba9ac6215422d4f61a705dc1c (diff)
downloadrust-403f34b599fb3ed7abd71f3388da3c5061a2d84f.tar.gz
rust-403f34b599fb3ed7abd71f3388da3c5061a2d84f.zip
Don't treat ref. fields with non-null niches as `dereferenceable_or_null`
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/type_of.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/type_of.rs b/compiler/rustc_codegen_gcc/src/type_of.rs
index 84d57838512..a30bce0a313 100644
--- a/compiler/rustc_codegen_gcc/src/type_of.rs
+++ b/compiler/rustc_codegen_gcc/src/type_of.rs
@@ -339,7 +339,8 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
             return pointee;
         }
 
-        let result = Ty::ty_and_layout_pointee_info_at(*self, cx, offset);
+        let assume_valid_ptr = true;
+        let result = Ty::ty_and_layout_pointee_info_at(*self, cx, offset, assume_valid_ptr);
 
         cx.pointee_infos.borrow_mut().insert((self.ty, offset), result);
         result