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
This commit is contained in:
Matthias Krüger 2023-10-15 21:29:09 +02:00 committed by GitHub
commit 32da83d338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -842,7 +842,7 @@ pub const fn guaranteed_eq(self, other: *const T) -> Option<bool>
where where
T: Sized, T: Sized,
{ {
match intrinsics::ptr_guaranteed_cmp(self as _, other as _) { match intrinsics::ptr_guaranteed_cmp(self, other) {
2 => None, 2 => None,
other => Some(other == 1), other => Some(other == 1),
} }