2022-11-21 13:34:47 -06:00
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:19:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 2 ^ 5;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::suspicious-xor-used-as-pow` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::suspicious_xor_used_as_pow)]`
|
2024-08-08 12:13:50 -05:00
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 2.pow(5);
|
|
|
|
| ~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:22:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 2i32 ^ 9i32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 2i32.pow(9i32);
|
|
|
|
| ~~~~~~~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:24:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 2i32 ^ 2i32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 2i32.pow(2i32);
|
|
|
|
| ~~~~~~~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:26:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 50i32 ^ 3i32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 50i32.pow(3i32);
|
|
|
|
| ~~~~~~~~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:28:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 5i32 ^ 8i32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 5i32.pow(8i32);
|
|
|
|
| ~~~~~~~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:30:13
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 2i32 ^ 32i32;
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | let _ = 2i32.pow(32i32);
|
|
|
|
| ~~~~~~~~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: `^` is not the exponentiation operator
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/suspicious_xor_used_as_pow.rs:13:9
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
|
LL | 1 ^ 2 // should warn even if inside macro
|
2024-08-08 12:13:50 -05:00
|
|
|
| ^^^^^
|
2022-11-21 13:34:47 -06:00
|
|
|
...
|
|
|
|
LL | macro_test_inside!();
|
|
|
|
| -------------------- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: this error originates in the macro `macro_test_inside` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2024-08-08 12:13:50 -05:00
|
|
|
help: did you mean to write
|
|
|
|
|
|
|
|
|
LL | 1.pow(2) // should warn even if inside macro
|
|
|
|
| ~~~~~~~~
|
2022-11-21 13:34:47 -06:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|