about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-15 21:29:09 +0200
committerGitHub <noreply@github.com>2023-10-15 21:29:09 +0200
commit32da83d3385609215782322dc7e1d98b71faf9f6 (patch)
tree2154ada202ca65010887d9b2e829f61064e5879b
parent7a6756292465820510042c5c419fcf182f63f5d4 (diff)
parentfe9d422e7b0e279bfb8cc348fdef409a100c8dac (diff)
downloadrust-32da83d3385609215782322dc7e1d98b71faf9f6.tar.gz
rust-32da83d3385609215782322dc7e1d98b71faf9f6.zip
Rollup merge of #116760 - Nilstrieb:triviality, r=oli-obk
Remove trivial cast in `guaranteed_eq`

I found this while accidentally breaking trivial casts in another branch.

r? oli-obk
-rw-r--r--library/core/src/ptr/const_ptr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs
index 9af8f1228f0..a3e4f0fb90a 100644
--- a/library/core/src/ptr/const_ptr.rs
+++ b/library/core/src/ptr/const_ptr.rs
@@ -842,7 +842,7 @@ impl<T: ?Sized> *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),
         }