]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_data_structures/array_vec.rs
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / librustc_data_structures / array_vec.rs
index adb22197226023fcb80731626f1ecc97255275f7..848e5a076bb9a3fee2b12dad3dbd8b61d8418962 100644 (file)
@@ -40,6 +40,12 @@ pub unsafe trait Array {
     const LEN: usize = 8;
 }
 
+unsafe impl<T> Array for [T; 32] {
+    type Element = T;
+    type PartialStorage = [ManuallyDrop<T>; 32];
+    const LEN: usize = 32;
+}
+
 pub struct ArrayVec<A: Array> {
     count: usize,
     values: A::PartialStorage