diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-01-06 11:21:25 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2025-01-06 17:57:17 +0100 |
| commit | 0b832bf8a3038ab8285f767ab45c98ec7c3da944 (patch) | |
| tree | e5d0bf6fd67a4acd10222081ec50913e9ac37282 /src/tools/rust-analyzer/crates/parser | |
| parent | 739362113c0943c07f1cf68577ed5719fbbc01bf (diff) | |
minor: New clippy lints
Diffstat (limited to 'src/tools/rust-analyzer/crates/parser')
| -rw-r--r-- | src/tools/rust-analyzer/crates/parser/src/input.rs | 2 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/parser/src/output.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/parser/src/input.rs b/src/tools/rust-analyzer/crates/parser/src/input.rs index 9504bd4d9ec..c90b358cfbb 100644 --- a/src/tools/rust-analyzer/crates/parser/src/input.rs +++ b/src/tools/rust-analyzer/crates/parser/src/input.rs @@ -72,7 +72,7 @@ impl Input { } pub(crate) fn is_joint(&self, n: usize) -> bool { let (idx, b_idx) = self.bit_index(n); - self.joint[idx] & 1 << b_idx != 0 + self.joint[idx] & (1 << b_idx) != 0 } } diff --git a/src/tools/rust-analyzer/crates/parser/src/output.rs b/src/tools/rust-analyzer/crates/parser/src/output.rs index 41d4c68b2d7..386d03a62cc 100644 --- a/src/tools/rust-analyzer/crates/parser/src/output.rs +++ b/src/tools/rust-analyzer/crates/parser/src/output.rs @@ -85,7 +85,7 @@ impl Output { } pub(crate) fn float_split_hack(&mut self, ends_in_dot: bool) { - let e = (Self::SPLIT_EVENT as u32) << Self::TAG_SHIFT + let e = ((Self::SPLIT_EVENT as u32) << Self::TAG_SHIFT) | ((ends_in_dot as u32) << Self::N_INPUT_TOKEN_SHIFT) | Self::EVENT_MASK; self.event.push(e); @@ -99,7 +99,7 @@ impl Output { } pub(crate) fn leave_node(&mut self) { - let e = (Self::EXIT_EVENT as u32) << Self::TAG_SHIFT | Self::EVENT_MASK; + let e = ((Self::EXIT_EVENT as u32) << Self::TAG_SHIFT) | Self::EVENT_MASK; self.event.push(e) } |
