mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
12 lines
284 B
Rust
12 lines
284 B
Rust
//@ run-fail
|
|
//@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes
|
|
//@ error-pattern: unsafe precondition(s) violated: Alignment::new_unchecked requires
|
|
|
|
#![feature(ptr_alignment_type)]
|
|
|
|
fn main() {
|
|
unsafe {
|
|
std::ptr::Alignment::new_unchecked(0);
|
|
}
|
|
}
|