mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 13:34:38 +00:00
16 lines
242 B
Rust
16 lines
242 B
Rust
//@ check-pass
|
|
|
|
// This test makes sure we always considers `const _` items as live for dead code analysis.
|
|
|
|
#![deny(dead_code)]
|
|
|
|
const fn is_nonzero(x: u8) -> bool {
|
|
x != 0
|
|
}
|
|
|
|
const _: () = {
|
|
assert!(is_nonzero(2));
|
|
};
|
|
|
|
fn main() {}
|