Skip to content

Commit 4c46296

Browse files
committed
fix match
1 parent 05cd48b commit 4c46296

File tree

1 file changed

+4
-2
lines changed
  • compiler/rustc_target/src/abi

1 file changed

+4
-2
lines changed

compiler/rustc_target/src/abi/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,10 @@ pub struct Scalar {
811811
impl Scalar {
812812
#[inline]
813813
pub fn is_bool(&self) -> bool {
814-
matches!(self.value, Int(I8, false))
815-
&& matches!(self.valid_range, WrappingRange { start: 0, end: 1 })
814+
matches!(
815+
self,
816+
Scalar { value: Int(I8, false), valid_range: WrappingRange { start: 0, end: 1 } }
817+
)
816818
}
817819

818820
/// Returns `true` if all possible numbers are valid, i.e `valid_range` covers the whole layout

0 commit comments

Comments
 (0)