Skip to content

Commit 1a6b930

Browse files
committed
clarify operator precedence
1 parent 46f5aa9 commit 1a6b930

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/libcore/hash/sip.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl<S: Sip> super::Hasher for Hasher<S> {
304304

305305
if self.ntail != 0 {
306306
needed = 8 - self.ntail;
307-
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << 8 * self.ntail;
307+
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << (8 * self.ntail);
308308
if length < needed {
309309
self.ntail += length;
310310
return;

src/librustc/ty/query/on_disk_cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ impl SpecializedEncoder<IntEncodedWithFixedSize> for opaque::Encoder {
997997
fn specialized_encode(&mut self, x: &IntEncodedWithFixedSize) -> Result<(), Self::Error> {
998998
let start_pos = self.position();
999999
for i in 0..IntEncodedWithFixedSize::ENCODED_SIZE {
1000-
((x.0 >> i * 8) as u8).encode(self)?;
1000+
((x.0 >> (i * 8)) as u8).encode(self)?;
10011001
}
10021002
let end_pos = self.position();
10031003
assert_eq!((end_pos - start_pos), IntEncodedWithFixedSize::ENCODED_SIZE);

src/librustc_data_structures/sip128.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl Hasher for SipHasher128 {
274274

275275
if self.ntail != 0 {
276276
needed = 8 - self.ntail;
277-
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << 8 * self.ntail;
277+
self.tail |= unsafe { u8to64_le(msg, 0, cmp::min(length, needed)) } << (8 * self.ntail);
278278
if length < needed {
279279
self.ntail += length;
280280
return;

0 commit comments

Comments
 (0)