We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91b0bd0 commit 6f4812bCopy full SHA for 6f4812b
core/tests/mem.rs
@@ -132,7 +132,7 @@ fn test_discriminant_send_sync() {
132
133
#[test]
134
fn assume_init_good() {
135
- const TRUE: bool = {
+ const TRUE: bool = unsafe {
136
let mut x = MaybeUninit::<bool>::uninit();
137
x.as_mut_ptr().write(true);
138
x.assume_init()
@@ -143,7 +143,7 @@ fn assume_init_good() {
143
144
#[should_panic]
145
fn assume_init_bad() {
146
- const BAD: () = {
+ const BAD: () = unsafe {
147
MaybeUninit::<!>::uninit().assume_init();
148
};
149
}
0 commit comments