summary refs log tree commit diff
path: root/src/test/ui/const_prop/inline_spans.rs
blob: 32902b49d0284ea86aa04fb2dae8b4eb19c59f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// build-fail
// compile-flags: -Zmir-opt-level=2

#![deny(warnings)]

fn main() {
    let _ = add(u8::MAX, 1);
    //~^ ERROR this arithmetic operation will overflow
}

#[inline(always)]
fn add(x: u8, y: u8) -> u8 {
    x + y
}