Skip to content

Commit

Permalink
Don't treat ref. fields with non-null niches as `dereferenceable_or_n…
Browse files Browse the repository at this point in the history
…ull`
  • Loading branch information
moulins committed Jul 21, 2023
1 parent f2dded2 commit 1984e20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/type_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1984e20

Please sign in to comment.