mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
12 lines
285 B
Rust
12 lines
285 B
Rust
//@ run-crash
|
|
//@ 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::mem::Alignment::new_unchecked(0);
|
|
}
|
|
}
|