rust/tests/compile-fail/validation_undef.rs
2018-06-05 18:08:18 +02:00

17 lines
289 B
Rust

// ignore-test validation_op is disabled
#![allow(unused_variables)]
// error-pattern: attempted to read undefined bytes
mod safe {
use std::mem;
pub(crate) fn make_float() -> f32 {
unsafe { mem::uninitialized() }
}
}
fn main() {
let _x = safe::make_float();
}