diff options
| author | Moulins <arthur.heuillard@orange.fr> | 2023-06-27 00:47:27 +0200 |
|---|---|---|
| committer | Moulins <arthur.heuillard@orange.fr> | 2023-07-21 03:31:46 +0200 |
| commit | 1984e208e06f320d62306e19940b86156460f98e (patch) | |
| tree | fc440eb53f901febfd69294b30564271e66e17cb | |
| parent | f2dded27f828ba02f76b1b714b3ab2361d4e003e (diff) | |
| download | rust-1984e208e06f320d62306e19940b86156460f98e.tar.gz rust-1984e208e06f320d62306e19940b86156460f98e.zip | |
Don't treat ref. fields with non-null niches as `dereferenceable_or_null`
| -rw-r--r-- | src/type_of.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/type_of.rs b/src/type_of.rs index 84d57838512..a30bce0a313 100644 --- a/src/type_of.rs +++ b/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 |
