We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27488fe commit c564661Copy full SHA for c564661
tests/ui/xor_used_as_pow.stderr
@@ -50,3 +50,17 @@ LL | let _ = 10 ^ 0;
50
51
error: aborting due to 7 previous errors
52
53
+error: it appears you are trying to get a power of two, but `^` is not an exponentiation operator
54
+ --> $DIR/xor_used_as_pow.rs:29:17
55
+ |
56
+LL | let _ = 2 ^ x;
57
+ | ^^^^ help: use a bitshift instead: `1_u32 << 15`
58
+
59
+error: `^` is not an exponentiation operator but appears to have been used as one
60
+ --> $DIR/xor_used_as_pow.rs:30:17
61
62
+LL | let _ = 10 ^ x;
63
+ | ^^^^^
64
65
+ = help: did you mean to use .pow()?
66
0 commit comments