]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const_prop/inline_spans_lint_attribute.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / const_prop / inline_spans_lint_attribute.rs
CommitLineData
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
7fn main() {
8 #[allow(arithmetic_overflow)]
9 let _ = add(u8::MAX, 1);
10}
11
12#[inline(always)]
13fn add(x: u8, y: u8) -> u8 {
14 x + y
15}