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 8e1c2e8 commit a2fd2e7Copy full SHA for a2fd2e7
core/tests/mem.rs
@@ -131,18 +131,9 @@ fn test_discriminant_send_sync() {
131
}
132
133
#[test]
134
+#[cfg(not(bootstrap))]
135
fn assume_init_good() {
136
const TRUE: bool = unsafe { MaybeUninit::<bool>::new(true).assume_init() };
137
138
assert!(TRUE);
139
-
140
-#[test]
141
-fn assume_init_bad() {
142
- const _BAD: () = unsafe {
143
- MaybeUninit::<!>::uninit().assume_init();
144
- //~^ ERROR the type `!` does not permit being left uninitialized
145
- //~| ERROR this code causes undefined behavior when executed
146
- //~| ERROR help: use `MaybeUninit<T>` instead, and only call `assume_init` after initialization is done
147
- };
148
-}
0 commit comments