2022-03-08 11:20:31 -06:00
|
|
|
// build-pass
|
2021-03-04 07:35:11 -06:00
|
|
|
// compile-flags: -Zmir-opt-level=3
|
2022-03-08 11:20:31 -06:00
|
|
|
// Overflow can't be detected by const prop
|
|
|
|
// could only be detected after optimizations
|
2020-09-19 10:27:56 -05:00
|
|
|
|
|
|
|
#![deny(warnings)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = add(u8::MAX, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
fn add(x: u8, y: u8) -> u8 {
|
|
|
|
x + y
|
|
|
|
}
|