rust/tests/compile-fail/ctlz_nonzero.rs
2018-07-15 12:00:02 +02:00

16 lines
268 B
Rust

#![feature(intrinsics)]
mod rusti {
extern "rust-intrinsic" {
pub fn ctlz_nonzero<T>(x: T) -> T;
}
}
pub fn main() {
unsafe {
use rusti::*;
ctlz_nonzero(0u8); //~ ERROR constant evaluation error: ctlz_nonzero called on 0
}
}