rename Scalar::{ptr_null -> null_ptr}

This commit is contained in:
Ralf Jung 2020-03-28 16:57:33 +01:00
parent 2acf32d9ad
commit 8bad4844b2
2 changed files with 2 additions and 2 deletions

View file

@ -192,7 +192,7 @@ impl<'tcx, Tag> Scalar<Tag> {
}
#[inline]
pub fn ptr_null(cx: &impl HasDataLayout) -> Self {
pub fn null_ptr(cx: &impl HasDataLayout) -> Self {
Scalar::Raw { data: 0, size: cx.data_layout().pointer_size.bytes() as u8 }
}

View file

@ -139,7 +139,7 @@ impl<Tag> MemPlace<Tag> {
/// Produces a Place that will error if attempted to be read from or written to
#[inline(always)]
fn null(cx: &impl HasDataLayout) -> Self {
Self::from_scalar_ptr(Scalar::ptr_null(cx), Align::from_bytes(1).unwrap())
Self::from_scalar_ptr(Scalar::null_ptr(cx), Align::from_bytes(1).unwrap())
}
#[inline(always)]