about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-06-07 00:58:32 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-06-07 15:54:16 +0200
commit8f3753703c9e4e587fcb9790a07aa18b310b8431 (patch)
tree415bcb1f3dc437676b88672b500bf00af0312c6b /src/test/rustdoc
parent8b36867093fb774bcbd9f787cbc470a5f44c1310 (diff)
downloadrust-8f3753703c9e4e587fcb9790a07aa18b310b8431.tar.gz
rust-8f3753703c9e4e587fcb9790a07aa18b310b8431.zip
Fix slice const generic length display
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/const-generics/const-generic-slice.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/rustdoc/const-generics/const-generic-slice.rs b/src/test/rustdoc/const-generics/const-generic-slice.rs
new file mode 100644
index 00000000000..60d96770f7e
--- /dev/null
+++ b/src/test/rustdoc/const-generics/const-generic-slice.rs
@@ -0,0 +1,12 @@
+#![crate_name = "foo"]
+#![feature(const_generics)]
+
+pub trait Array {
+    type Item;
+}
+
+// @has foo/trait.Array.html
+// @has - '//h3[@class="impl"]' 'impl<T, const N: usize> Array for [T; N]'
+impl <T, const N: usize> Array for [T; N] {
+    type Item = T;
+}