Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (14 sloc) 382 Bytes
// build-pass (FIXME(62277): could be check-pass?)
// if `X` were used instead of `x`, `X - 10` would result in a lint.
// This file should never produce a lint, no matter how the const
// propagator is improved.
#![deny(warnings)]
const X: u32 = 5;
fn main() {
let x = X;
if x > 10 {
println!("{}", x - 10);
} else {
println!("{}", 10 - x);
}
}
You can’t perform that action at this time.