Skip to content

Commit 7bd754c

Browse files
committed
Fix tests (hopefully)
1 parent d366ed2 commit 7bd754c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_mir/src/const_eval/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl fmt::Display for ConstEvalErrKind {
4747
Panic { msg, line, col, file } => {
4848
write!(f, "the evaluated program panicked at '{}', {}:{}:{}", msg, file, line, col)
4949
}
50-
Abort(ref msg) => write!(f, "{}", msg)
50+
Abort(ref msg) => write!(f, "{}", msg),
5151
}
5252
}
5353
}

library/core/tests/mem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn test_discriminant_send_sync() {
132132

133133
#[test]
134134
fn assume_init_good() {
135-
const TRUE: bool = {
135+
const TRUE: bool = unsafe {
136136
let mut x = MaybeUninit::<bool>::uninit();
137137
x.as_mut_ptr().write(true);
138138
x.assume_init()
@@ -143,7 +143,7 @@ fn assume_init_good() {
143143
#[test]
144144
#[should_panic]
145145
fn assume_init_bad() {
146-
const BAD: () = {
146+
const BAD: () = unsafe {
147147
MaybeUninit::<!>::uninit().assume_init();
148148
};
149149
}

0 commit comments

Comments
 (0)