about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-06-01 05:24:11 +0000
committerbors <bors@rust-lang.org>2017-06-01 05:24:11 +0000
commit38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a (patch)
treefd62a4e7688baa1ef79d4d4ac559f487d64903e4 /src/test/rustdoc
parente0cc22b4bae8007c59fbe58f2c104ecd743d746a (diff)
parent9bd6dc73fc7fd46bf83ff17bea13a410efb1fc96 (diff)
downloadrust-38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a.tar.gz
rust-38efb2e1ccf210b0108d2b88ee9d4ddcd8e91a3a.zip
Auto merge of #42348 - frewsxcv:rollup, r=frewsxcv
Rollup of 9 pull requests

- Successful merges: #42136, #42275, #42286, #42297, #42302, #42306, #42314, #42324, #42347
- Failed merges:
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/assoc-consts.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/rustdoc/assoc-consts.rs b/src/test/rustdoc/assoc-consts.rs
index d4119f5d351..04709407e58 100644
--- a/src/test/rustdoc/assoc-consts.rs
+++ b/src/test/rustdoc/assoc-consts.rs
@@ -26,3 +26,21 @@ impl Bar {
     // @has - '//*[@class="docblock"]' 'BAR: usize = 3'
     pub const BAR: usize = 3;
 }
+
+pub struct Baz<'a, U: 'a, T>(T, &'a [U]);
+
+impl Bar {
+    // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAZ"]' \
+    //      "const BAZ: Baz<'static, u8, u32>"
+    // @has - '//*[@class="docblock"]' "BAZ: Baz<'static, u8, u32> = Baz(321, &[1, 2, 3])"
+    pub const BAZ: Baz<'static, u8, u32> = Baz(321, &[1, 2, 3]);
+}
+
+pub fn f(_: &(ToString + 'static)) {}
+
+impl Bar {
+    // @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.F"]' \
+    //      "const F: fn(_: &(ToString + 'static))"
+    // @has - '//*[@class="docblock"]' "F: fn(_: &(ToString + 'static)) = f"
+    pub const F: fn(_: &(ToString + 'static)) = f;
+}