From d92810646ed517376b16ac3b1fed329d8df2a8a9 Mon Sep 17 00:00:00 2001 From: Andreas Liljeqvist Date: Mon, 23 Aug 2021 15:52:47 +0200 Subject: [PATCH] Simplify zero check --- compiler/rustc_target/src/abi/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs index 6e2f8962eef..b352243c0c4 100644 --- a/compiler/rustc_target/src/abi/mod.rs +++ b/compiler/rustc_target/src/abi/mod.rs @@ -710,7 +710,7 @@ pub fn contains(&self, v: u128) -> bool { /// Equal to `range.contains(0)` but should be faster. #[inline] pub fn contains_zero(&self) -> bool { - !(self.start <= self.end && self.start != 0) + self.start > self.end || self.start == 0 } /// Returns new `WrappingRange` with replaced `start` -- GitLab