This commit is contained in:
Takayuki Maeda 2021-02-06 00:10:52 +09:00
parent 357c6a7e27
commit 67d48e1c59

View File

@ -7,7 +7,7 @@ fn main() {
let one_more_f64_nan = 0.0f64 / 0.0f64; let one_more_f64_nan = 0.0f64 / 0.0f64;
let zero = 0.0; let zero = 0.0;
let other_zero = 0.0; let other_zero = 0.0;
let other_nan = zero / other_zero; // fine - this lint doesn't propegate constants. let other_nan = zero / other_zero; // fine - this lint doesn't propagate constants.
let not_nan = 2.0 / 0.0; // not an error: 2/0 = inf let not_nan = 2.0 / 0.0; // not an error: 2/0 = inf
let also_not_nan = 0.0 / 2.0; // not an error: 0/2 = 0 let also_not_nan = 0.0 / 2.0; // not an error: 0/2 = 0
} }