about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-15 02:56:38 +0000
committerbors <bors@rust-lang.org>2020-05-15 02:56:38 +0000
commit027149919e36ce5645ca5d02d55b97ef52eb55ba (patch)
tree3adccc771fc0ed4971b16dfcca7cb7cc87dc4d82 /src/test
parent85f0da67ff31923955f7fb107fb097835bb3b6ff (diff)
parent49d50e6e9454cc1990ecdef9377541dbcdbf4864 (diff)
downloadrust-027149919e36ce5645ca5d02d55b97ef52eb55ba.tar.gz
rust-027149919e36ce5645ca5d02d55b97ef52eb55ba.zip
Auto merge of #72222 - Dylan-DPC:rollup-vaw44dg, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #71809 (Use `LocalDefId` in `DumpVisitor::nest_tables`)
 - #72062 (Add built in PSP target)
 - #72146 (Provide separate option for std debug asserts)
 - #72172 (Forbid stage arguments to check)
 - #72173 (Make intra links work inside trait impl block)
 - #72200 (Add prioritize_on attribute to triagebot)
 - #72214 (Minor fixes to comments)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/intra-link-trait-impl.rs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/test/rustdoc/intra-link-trait-impl.rs b/src/test/rustdoc/intra-link-trait-impl.rs
new file mode 100644
index 00000000000..fab8406d525
--- /dev/null
+++ b/src/test/rustdoc/intra-link-trait-impl.rs
@@ -0,0 +1,35 @@
+#![crate_name = "foo"]
+
+// ignore-tidy-linelength
+
+pub struct MyStruct;
+
+impl MyTrait for MyStruct {
+
+// @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#associatedtype.AssoType'
+
+    /// [`AssoType`]
+    ///
+    /// [`AssoType`]: MyStruct::AssoType
+    type AssoType = u32;
+
+// @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#associatedconstant.ASSO_CONST'
+
+    /// [`ASSO_CONST`]
+    ///
+    /// [`ASSO_CONST`]: MyStruct::ASSO_CONST
+    const ASSO_CONST: i32 = 10;
+
+// @has foo/struct.MyStruct.html '//a/@href' '../foo/struct.MyStruct.html#method.trait_fn'
+
+    /// [`trait_fn`]
+    ///
+    /// [`trait_fn`]: MyStruct::trait_fn
+    fn trait_fn() { }
+}
+
+pub trait MyTrait {
+    type AssoType;
+    const ASSO_CONST: i32 = 1;
+    fn trait_fn();
+}