Rename rustc_middle::Ty::is_unsafe_ptr to is_raw_ptr
The wording unsafe pointer is less common and not mentioned in a lot of places, instead this is usually called a "raw pointer". For the sake of uniformity, we rename this method. This came up during the review of https://github.com/rust-lang/rust/pull/134424.
This commit is contained in:
@@ -269,7 +269,7 @@ fn layout_of_uncached<'tcx>(
|
||||
// Potentially-wide pointers.
|
||||
ty::Ref(_, pointee, _) | ty::RawPtr(pointee, _) => {
|
||||
let mut data_ptr = scalar_unit(Pointer(AddressSpace::DATA));
|
||||
if !ty.is_unsafe_ptr() {
|
||||
if !ty.is_raw_ptr() {
|
||||
data_ptr.valid_range_mut().start = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user