From 2caeaf54a1d44b1fe95c3ecaee9daa4ac576fd76 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 12 May 2019 16:53:39 +0200 Subject: Fix display of const generics in rustdoc --- src/test/rustdoc/generic-const.rs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/test/rustdoc/generic-const.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/generic-const.rs b/src/test/rustdoc/generic-const.rs new file mode 100644 index 00000000000..d6794ac8f1d --- /dev/null +++ b/src/test/rustdoc/generic-const.rs @@ -0,0 +1,30 @@ +#![feature(const_generics)] +#![crate_name = "foo"] + +// ignore-tidy-linelength + +pub enum Order { + Sorted, + Unsorted, +} + +// @has foo/struct.VSet.html '//pre[@class="rust struct"]' 'pub struct VSet' +// @has foo/struct.VSet.html '//h3[@id="impl-Send"]/code' 'impl Send for VSet' +// @has foo/struct.VSet.html '//h3[@id="impl-Sync"]/code' 'impl Sync for VSet' +pub struct VSet { + inner: Vec, +} + +// @has foo/struct.VSet.html '//h3[@id="impl"]/code' 'impl VSet' +impl VSet { + pub fn new() -> Self { + Self { inner: Vec::new() } + } +} + +// @has foo/struct.VSet.html '//h3[@id="impl-1"]/code' 'impl VSet' +impl VSet { + pub fn new() -> Self { + Self { inner: Vec::new() } + } +} -- cgit 1.4.1-3-g733a5