2018-05-09 08:54:45 -05:00
|
|
|
// ignore-test validation_op is disabled
|
|
|
|
|
2017-09-16 05:11:48 -05:00
|
|
|
#![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();
|
|
|
|
}
|