about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-04-04 15:31:43 -0700
committerCamelid <camelidcamel@gmail.com>2021-04-04 15:49:57 -0700
commit45ccd50d0e52e006fdd81f854b4cd711ac439e85 (patch)
treea972b6a9cc98b15c4ced03b94dfb19068b99b01c /src/test/rustdoc
parent8ad6a443cfee83e1f7d29c9ec0de26143c54a617 (diff)
downloadrust-45ccd50d0e52e006fdd81f854b4cd711ac439e85.tar.gz
rust-45ccd50d0e52e006fdd81f854b4cd711ac439e85.zip
Don't report disambiguator error if link would have been ignored
This prevents us from warning on links such as `<hello@example.com>`.
Note that we still warn on links such as `<hello@localhost>` because
they have no dots in them. However, the links will still work, even
though a warning is reported.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/intra-doc/email-address.rs6
1 files changed, 6 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'