-a ** b
Someone who learned PEMDAS in school may argue it should be equivalent to -(a * b), while a programmer may be used to unary operators binding tightest, so (-a) * b.Yes, Clippy has a "precedence" lint that's enabled by default: https://clippy.rust-lang.org/master/index.html?search=preced...
Here's what it looks like:
warning: operator precedence might not be obvious
--> src/main.rs:2:5
|
2 | 1 << 2 + 3;
| ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#precedence
= note: `#[warn(clippy::precedence)]` on by default