blob: 410ab1fe4ec1f7b86cb65f1527e54ef2e6a33f43 [file] [log] [blame] [edit]
//@ run-pass
//@ compile-flags: -Zub-checks=yes
#![feature(cfg_ub_checks)]
fn main() {
assert!(cfg!(ub_checks));
assert!(compiles_differently());
}
#[cfg(ub_checks)]
fn compiles_differently() -> bool {
true
}
#[cfg(not(ub_checks))]
fn compiles_differently() -> bool {
false
}