diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-28 16:57:33 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-28 16:57:33 +0100 |
| commit | 8bad4844b2034ff347479cc27275dc9ea8899f15 (patch) | |
| tree | 2d4519ff9da133a709bcd99cab27b19502a81cec /src | |
| parent | 2acf32d9adff836a3111c039e4e10a48ee5c79b5 (diff) | |
| download | rust-8bad4844b2034ff347479cc27275dc9ea8899f15.tar.gz rust-8bad4844b2034ff347479cc27275dc9ea8899f15.zip | |
rename Scalar::{ptr_null -> null_ptr}
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/mir/interpret/value.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/interpret/place.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc/mir/interpret/value.rs index 706cf1cd09a..bf4ee848823 100644 --- a/src/librustc/mir/interpret/value.rs +++ b/src/librustc/mir/interpret/value.rs @@ -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 } } diff --git a/src/librustc_mir/interpret/place.rs b/src/librustc_mir/interpret/place.rs index 94c9a8b2a6d..79cae21b234 100644 --- a/src/librustc_mir/interpret/place.rs +++ b/src/librustc_mir/interpret/place.rs @@ -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)] |
