about summary refs log tree commit diff
path: root/tests/ui/consts
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 /tests/ui/consts
parent1805b3348341e0918912ab61cb1dffad41648d23 (diff)
downloadrust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.tar.gz
rust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.zip
rename sub_ptr 😅
Diffstat (limited to 'tests/ui/consts')
-rw-r--r--tests/ui/consts/offset_from.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/consts/offset_from.rs b/tests/ui/consts/offset_from.rs
index c06314ac7df..02e8d145f65 100644
--- a/tests/ui/consts/offset_from.rs
+++ b/tests/ui/consts/offset_from.rs
@@ -44,7 +44,7 @@ pub const OFFSET_EQUAL_INTS: isize = {
 pub const OFFSET_UNSIGNED: usize = {
     let a = ['a', 'b', 'c'];
     let ptr = a.as_ptr();
-    unsafe { ptr.add(2).sub_ptr(ptr) }
+    unsafe { ptr.add(2).offset_from_unsigned(ptr) }
 };
 
 fn main() {