Fix tests (hopefully)
This commit is contained in:
parent
d366ed2730
commit
7bd754cf8c
|
@ -47,7 +47,7 @@ impl fmt::Display for ConstEvalErrKind {
|
|||
Panic { msg, line, col, file } => {
|
||||
write!(f, "the evaluated program panicked at '{}', {}:{}:{}", msg, file, line, col)
|
||||
}
|
||||
Abort(ref msg) => write!(f, "{}", msg)
|
||||
Abort(ref msg) => write!(f, "{}", msg),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ fn test_discriminant_send_sync() {
|
|||
|
||||
#[test]
|
||||
fn assume_init_good() {
|
||||
const TRUE: bool = {
|
||||
const TRUE: bool = unsafe {
|
||||
let mut x = MaybeUninit::<bool>::uninit();
|
||||
x.as_mut_ptr().write(true);
|
||||
x.assume_init()
|
||||
|
@ -143,7 +143,7 @@ fn assume_init_good() {
|
|||
#[test]
|
||||
#[should_panic]
|
||||
fn assume_init_bad() {
|
||||
const BAD: () = {
|
||||
const BAD: () = unsafe {
|
||||
MaybeUninit::<!>::uninit().assume_init();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue