about summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-23 15:11:06 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-03-23 15:11:06 -0700
commit19510ac70bd29a0e0e2ef4d63007b85ba179582e (patch)
treefbba867d2fdfe8ee335c0a373cc12eeb422f33b2 /src/librustdoc/html/render.rs
parent28fcdc0df70c360ef9892ff45b4fd91ef60500ab (diff)
parent2df8830642fffa6c68aa6318985cfcd2e63db81b (diff)
downloadrust-19510ac70bd29a0e0e2ef4d63007b85ba179582e.tar.gz
rust-19510ac70bd29a0e0e2ef4d63007b85ba179582e.zip
rollup merge of #23633: tomjakubowski/rustdoc-array-prim
Previously, impls for `[T; n]` were collected in the same place as impls for `[T]` and `&[T]`. This splits them out into their own primitive page in both core and std.
Diffstat (limited to 'src/librustdoc/html/render.rs')
-rw-r--r--src/librustdoc/html/render.rs19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 1b2fc5964ab..d57739c4002 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1026,7 +1026,8 @@ impl DocFolder for Cache {
                 match item {
                     clean::Item{ attrs, inner: clean::ImplItem(i), .. } => {
                         use clean::{Primitive, Vector, ResolvedPath, BorrowedRef};
-                        use clean::{FixedVector, Slice, Tuple, PrimitiveTuple};
+                        use clean::PrimitiveType::{Array, Slice, PrimitiveTuple};
+                        use clean::{FixedVector, Tuple};
 
                         // extract relevant documentation for this impl
                         let dox = match attrs.into_iter().find(|a| {
@@ -1056,12 +1057,16 @@ impl DocFolder for Cache {
                                 Some(ast_util::local_def(p.to_node_id()))
                             }
 
-                            // In a DST world, we may only need
-                            // Vector/FixedVector, but for now we also pick up
-                            // borrowed references
-                            Vector(..) | FixedVector(..) |
-                                BorrowedRef{ type_: box Vector(..), ..  } |
-                                BorrowedRef{ type_: box FixedVector(..), .. } =>
+                            FixedVector(..) |
+                                BorrowedRef { type_: box FixedVector(..), .. } =>
+                            {
+                                Some(ast_util::local_def(Array.to_node_id()))
+                            }
+
+                            // In a DST world, we may only need Vector, but for now we
+                            // also pick up borrowed references
+                            Vector(..) |
+                                BorrowedRef{ type_: box Vector(..), ..  } =>
                             {
                                 Some(ast_util::local_def(Slice.to_node_id()))
                             }