diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs index 4ed8149dadc57c3f7d6c9fa5577815ef73f5e5a9..25b1752afadbddce79de5cd10c287ec181ac1615 100644 --- a/compiler/rustc_target/src/abi/mod.rs +++ b/compiler/rustc_target/src/abi/mod.rs @@ -811,8 +811,10 @@ pub struct Scalar { impl Scalar { #[inline] pub fn is_bool(&self) -> bool { - matches!(self.value, Int(I8, false)) - && matches!(self.valid_range, WrappingRange { start: 0, end: 1 }) + matches!( + self, + Scalar { value: Int(I8, false), valid_range: WrappingRange { start: 0, end: 1 } } + ) } /// Returns `true` if all possible numbers are valid, i.e `valid_range` covers the whole layout