]> git.lizzy.rs Git - rust.git/blob - tests/ui/const_prop/inline_spans.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / const_prop / inline_spans.rs
1 // build-pass
2 // compile-flags: -Zmir-opt-level=3
3 // Overflow can't be detected by const prop
4 // could only be detected after optimizations
5
6 #![deny(warnings)]
7
8 fn main() {
9     let _ = add(u8::MAX, 1);
10 }
11
12 #[inline(always)]
13 fn add(x: u8, y: u8) -> u8 {
14     x + y
15 }