From fe9d422e7b0e279bfb8cc348fdef409a100c8dac Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 15 Oct 2023 12:33:44 +0200 Subject: [PATCH] Remove trivial cast in `guaranteed_eq` I found this while accidentally breaking trivial casts in another branch. --- library/core/src/ptr/const_ptr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 9af8f1228f0b6..a3e4f0fb90abe 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -842,7 +842,7 @@ impl *const T { where T: Sized, { - match intrinsics::ptr_guaranteed_cmp(self as _, other as _) { + match intrinsics::ptr_guaranteed_cmp(self, other) { 2 => None, other => Some(other == 1), }