]> git.lizzy.rs Git - rust.git/blob - tests/ui/const_prop/inline_spans_lint_attribute.rs
Rollup merge of #106625 - Swatinem:ref/cov6, r=nagisa
[rust.git] / tests / ui / const_prop / inline_spans_lint_attribute.rs
1 // Must be build-pass, because check-pass will not run const prop and thus not emit the lint anyway.
2 // build-pass
3 // compile-flags: -Zmir-opt-level=3
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 }