diff options
| author | bendn <bend.n@outlook.com> | 2025-02-23 20:26:28 +0700 |
|---|---|---|
| committer | bendn <bend.n@outlook.com> | 2025-02-23 23:11:00 +0700 |
| commit | c813d8f3e49aa4c85c9eded426b6507701a2ff94 (patch) | |
| tree | e40e0f5366b247f274c1107760ae404bac216b57 /tests/ui/consts | |
| parent | 1805b3348341e0918912ab61cb1dffad41648d23 (diff) | |
| download | rust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.tar.gz rust-c813d8f3e49aa4c85c9eded426b6507701a2ff94.zip | |
rename sub_ptr 😅
Diffstat (limited to 'tests/ui/consts')
| -rw-r--r-- | tests/ui/consts/offset_from.rs | 2 |
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() { |
