]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | // Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway. |
2 | // build-pass | |
6a06907d | 3 | // compile-flags: -Zmir-opt-level=3 |
5869c6ff XL |
4 | |
5 | #![deny(warnings)] | |
6 | ||
7 | fn main() { | |
8 | #[allow(arithmetic_overflow)] | |
9 | let _ = add(u8::MAX, 1); | |
10 | } | |
11 | ||
12 | #[inline(always)] | |
13 | fn add(x: u8, y: u8) -> u8 { | |
14 | x + y | |
15 | } |