]> git.lizzy.rs Git - rust.git/blob - tests/ui/mul_add.rs
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
[rust.git] / tests / ui / mul_add.rs
1 #![warn(clippy::manual_mul_add)]
2 #![allow(unused_variables)]
3
4 fn mul_add_test() {
5     let a: f64 = 1234.567;
6     let b: f64 = 45.67834;
7     let c: f64 = 0.0004;
8
9     // Examples of not auto-fixable expressions
10     let test1 = (a * b + c) * (c + a * b) + (c + (a * b) + c);
11     let test2 = 1234.567 * 45.67834 + 0.0004;
12 }
13
14 fn main() {
15     mul_add_test();
16 }