Skip to content

Commit 1cb9b4d

Browse files
committed
Fix ambiguous precedences in tests
1 parent 0a3188b commit 1cb9b4d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library/core/tests/num/i32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn test_arith_operation() {
1515
assert_eq!(i32_a * i32_a * i32_a, 1000);
1616
assert_eq!(i32_a * i32_a * i32_a * i32_a, 10000);
1717
assert_eq!(i32_a * i32_a / i32_a * i32_a, 100);
18-
assert_eq!(i32_a * (i32_a - 1) << (2 + i32_a as usize), 368640);
18+
assert_eq!((i32_a * (i32_a - 1)) << (2 + i32_a as usize), 368640);
1919
let i32_b: isize = 0x10101010;
2020
assert_eq!(i32_b + 1 - 1, i32_b);
2121
assert_eq!(i32_b << 1, i32_b << 1);

tests/rustdoc/const-generics/const-generics-docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub async fn b_sink<const N: usize>(_: impl Trait<N>) {}
7474

7575
// @has foo/fn.concrete.html '//pre[@class="rust item-decl"]' \
7676
// 'pub fn concrete() -> [u8; 22]'
77-
pub fn concrete() -> [u8; 3 + std::mem::size_of::<u64>() << 1] {
77+
pub fn concrete() -> [u8; (3 + std::mem::size_of::<u64>()) << 1] {
7878
Default::default()
7979
}
8080

tests/ui/consts/const-err-rpass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const W: bool = Z <= 'B';
99

1010

1111
fn main() {
12-
let _ = ((-1 as i8) << 8 - 1) as f32;
12+
let _ = ((-1 as i8) << (8 - 1)) as f32;
1313
let _ = 0u8 as char;
1414
let _ = true > false;
1515
let _ = true >= false;

0 commit comments

Comments
 (0)