]> git.lizzy.rs Git - rust.git/blob - tests/ui/floating_point_powi.stderr
Lint for x.powi(2) => x * x
[rust.git] / tests / ui / floating_point_powi.stderr
1 error: square can be computed more accurately
2   --> $DIR/floating_point_powi.rs:7:13
3    |
4 LL |     let _ = x.powi(2);
5    |             ^^^^^^^^^ help: consider using: `x * x`
6    |
7    = note: `-D clippy::imprecise-flops` implied by `-D warnings`
8
9 error: square can be computed more accurately
10   --> $DIR/floating_point_powi.rs:8:13
11    |
12 LL |     let _ = x.powi(1 + 1);
13    |             ^^^^^^^^^^^^^ help: consider using: `x * x`
14
15 error: aborting due to 2 previous errors
16