Fix tests (hopefully)

This commit is contained in:
Albin Hedman 2020-12-05 18:39:10 +01:00
parent d366ed2730
commit 7bd754cf8c
2 changed files with 3 additions and 3 deletions

View file

@ -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),
}
}
}

View file

@ -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();
};
}