Skip to content

Commit 8bad484

Browse files
committed
rename Scalar::{ptr_null -> null_ptr}
1 parent 2acf32d commit 8bad484

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/mir/interpret/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<'tcx, Tag> Scalar<Tag> {
192192
}
193193

194194
#[inline]
195-
pub fn ptr_null(cx: &impl HasDataLayout) -> Self {
195+
pub fn null_ptr(cx: &impl HasDataLayout) -> Self {
196196
Scalar::Raw { data: 0, size: cx.data_layout().pointer_size.bytes() as u8 }
197197
}
198198

src/librustc_mir/interpret/place.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<Tag> MemPlace<Tag> {
139139
/// Produces a Place that will error if attempted to be read from or written to
140140
#[inline(always)]
141141
fn null(cx: &impl HasDataLayout) -> Self {
142-
Self::from_scalar_ptr(Scalar::ptr_null(cx), Align::from_bytes(1).unwrap())
142+
Self::from_scalar_ptr(Scalar::null_ptr(cx), Align::from_bytes(1).unwrap())
143143
}
144144

145145
#[inline(always)]

0 commit comments

Comments
 (0)