]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const_prop/inline_spans.rs
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / const_prop / inline_spans.rs
1 // build-fail
2 // compile-flags: -Zmir-opt-level=3
3
4 #![deny(warnings)]
5
6 fn main() {
7     let _ = add(u8::MAX, 1);
8     //~^ ERROR this arithmetic operation will overflow
9 }
10
11 #[inline(always)]
12 fn add(x: u8, y: u8) -> u8 {
13     x + y
14 }