about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-05 11:06:20 +0000
committerbors <bors@rust-lang.org>2021-04-05 11:06:20 +0000
commit39eee173fbcc21462d255b364b87715cd33b62db (patch)
treee930e86d52114de16148de08b917c974cb874669 /src/test/rustdoc
parent58e71896506edb701f276158bd2f47e8788a1133 (diff)
parent3ca197e89c9affc76e79f0421e1bb9d65a8ec855 (diff)
downloadrust-39eee173fbcc21462d255b364b87715cd33b62db.tar.gz
rust-39eee173fbcc21462d255b364b87715cd33b62db.zip
Auto merge of #83880 - Dylan-DPC:rollup-hz9ph0e, r=Dylan-DPC
Rollup of 8 pull requests

Successful merges:

 - #81922 (Let `#[allow(unstable_name_collisions)]` work for things other than function)
 - #82483 (Use FromStr trait for number option parsing)
 - #82739 (Use the beta compiler for building bootstrap tools when `download-rustc` is set)
 - #83650 (Update Source Serif to release 4.004)
 - #83826 (List trait impls before deref methods in doc's sidebar)
 - #83831 (Add `#[inline]` to IpAddr methods)
 - #83863 (Render destructured struct function param names as underscore)
 - #83865 (Don't report disambiguator error if link would have been ignored)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/intra-doc/email-address.rs6
-rw-r--r--src/test/rustdoc/struct-arg-pattern.rs10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/rustdoc/intra-doc/email-address.rs b/src/test/rustdoc/intra-doc/email-address.rs
new file mode 100644
index 00000000000..c407eb80da2
--- /dev/null
+++ b/src/test/rustdoc/intra-doc/email-address.rs
@@ -0,0 +1,6 @@
+//! Email me at <hello@example.com>.
+//! Email me at <hello-world@example.com>.
+//! Email me at <hello@localhost> (this warns but will still become a link).
+// @has email_address/index.html '//a[@href="mailto:hello@example.com"]' 'hello@example.com'
+// @has email_address/index.html '//a[@href="mailto:hello-world@example.com"]' 'hello-world@example.com'
+// @has email_address/index.html '//a[@href="mailto:hello@localhost"]' 'hello@localhost'
diff --git a/src/test/rustdoc/struct-arg-pattern.rs b/src/test/rustdoc/struct-arg-pattern.rs
new file mode 100644
index 00000000000..3c0369e3d34
--- /dev/null
+++ b/src/test/rustdoc/struct-arg-pattern.rs
@@ -0,0 +1,10 @@
+#![crate_name = "foo"]
+
+struct BodyId {
+    hir_id: usize,
+}
+
+// @has 'foo/fn.body_owner.html' '//*[@class="rust fn"]' 'pub fn body_owner(_: BodyId)'
+pub fn body_owner(BodyId { hir_id }: BodyId) {
+    // ...
+}