about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-23 15:16:24 +0100
committerGitHub <noreply@github.com>2019-12-23 15:16:24 +0100
commit67c0f4e2c947cf87f330224d6b764d2777cc8b59 (patch)
treeb267185e0dbe02ff47938a1f0371f4efa2da3393 /src/test/rustdoc
parent1de2705c7985819e4d36975fe26aad1510521140 (diff)
parentc205f6a06a8360367a7f6242f0d2615e94824024 (diff)
Rollup merge of #67507 - Mark-Simulacrum:purge-uninit, r=Centril
Remove mem::uninitalized from tests

This purges uses of uninitialized where possible from test cases. Some
are merely moved over to the equally bad pattern of
MaybeUninit::uninit().assume_init() but with an annotation that this is
"the best we can do".

Fixes #62397
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/issue-52873.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/rustdoc/issue-52873.rs b/src/test/rustdoc/issue-52873.rs
index 653c004c04b..8000ce73bd4 100644
--- a/src/test/rustdoc/issue-52873.rs
+++ b/src/test/rustdoc/issue-52873.rs
@@ -105,8 +105,7 @@ impl<U: Unsigned, B: Bit> Add<B0> for UInt<U, B> {
 impl<U: Unsigned> Add<U> for UTerm {
     type Output = U;
     fn add(self, _: U) -> Self::Output {
-        #[allow(deprecated)]
-        unsafe { ::std::mem::uninitialized() }
+        unimplemented!()
     }
 }
 
@@ -137,7 +136,7 @@ where
 {
     type Output = UInt<Prod<Ul, UInt<Ur, B>>, B0>;
     fn mul(self, _: UInt<Ur, B>) -> Self::Output {
-        unsafe { ::std::mem::uninitialized() }
+        unimplemented!()
     }
 }