Skip to content

Commit d313a6d

Browse files
committed
Test case for 3 operands
1 parent 05a567b commit d313a6d

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

tests/ui/decimal_bitwise_operands.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ fn main() {
3232
//~^ decimal_bitwise_operands
3333
//~| decimal_bitwise_operands
3434

35+
37 & 38 & 39;
36+
//~^ decimal_bitwise_operands
37+
//~| decimal_bitwise_operands
38+
//~| decimal_bitwise_operands
39+
3540
// GOOD: Bitwise operation, binary/hex/octal literal, one literal
3641
x & 0b1010;
3742
x | 0b1010;

tests/ui/decimal_bitwise_operands.stderr

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,29 @@ LL | 88 & 99;
120120
|
121121
= help: use binary (0b...), hex (0x...), or octal (0o...) notation for better readability
122122

123-
error: aborting due to 15 previous errors
123+
error: using decimal literal for bitwise operation
124+
--> tests/ui/decimal_bitwise_operands.rs:35:15
125+
|
126+
LL | 37 & 38 & 39;
127+
| ^^
128+
|
129+
= help: use binary (0b...), hex (0x...), or octal (0o...) notation for better readability
130+
131+
error: using decimal literal for bitwise operation
132+
--> tests/ui/decimal_bitwise_operands.rs:35:5
133+
|
134+
LL | 37 & 38 & 39;
135+
| ^^
136+
|
137+
= help: use binary (0b...), hex (0x...), or octal (0o...) notation for better readability
138+
139+
error: using decimal literal for bitwise operation
140+
--> tests/ui/decimal_bitwise_operands.rs:35:10
141+
|
142+
LL | 37 & 38 & 39;
143+
| ^^
144+
|
145+
= help: use binary (0b...), hex (0x...), or octal (0o...) notation for better readability
146+
147+
error: aborting due to 18 previous errors
124148

0 commit comments

Comments
 (0)