about summary refs log tree commit diff
path: root/compiler/rustc_serialize
diff options
context:
space:
mode:
authorbendn <bend.n@outlook.com>2025-02-23 20:26:28 +0700
committerbendn <bend.n@outlook.com>2025-02-23 23:11:00 +0700
commitc813d8f3e49aa4c85c9eded426b6507701a2ff94 (patch)
treee40e0f5366b247f274c1107760ae404bac216b57 /compiler/rustc_serialize
parent1805b3348341e0918912ab61cb1dffad41648d23 (diff)
downloadrust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.tar.gz
rust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.zip
rename sub_ptr 😅
Diffstat (limited to 'compiler/rustc_serialize')
-rw-r--r--compiler/rustc_serialize/src/opaque.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_serialize/src/opaque.rs b/compiler/rustc_serialize/src/opaque.rs
index 27e9f817894..d4907b69b72 100644
--- a/compiler/rustc_serialize/src/opaque.rs
+++ b/compiler/rustc_serialize/src/opaque.rs
@@ -280,13 +280,13 @@ impl<'a> MemDecoder<'a> {
     #[inline]
     pub fn len(&self) -> usize {
         // SAFETY: This recovers the length of the original slice, only using members we never modify.
-        unsafe { self.end.sub_ptr(self.start) }
+        unsafe { self.end.offset_from_unsigned(self.start) }
     }
 
     #[inline]
     pub fn remaining(&self) -> usize {
         // SAFETY: This type guarantees current <= end.
-        unsafe { self.end.sub_ptr(self.current) }
+        unsafe { self.end.offset_from_unsigned(self.current) }
     }
 
     #[cold]
@@ -400,7 +400,7 @@ impl<'a> Decoder for MemDecoder<'a> {
     #[inline]
     fn position(&self) -> usize {
         // SAFETY: This type guarantees start <= current
-        unsafe { self.current.sub_ptr(self.start) }
+        unsafe { self.current.offset_from_unsigned(self.start) }
     }
 }