diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-04-05 13:03:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-05 13:03:44 +0200 |
| commit | 3ca197e89c9affc76e79f0421e1bb9d65a8ec855 (patch) | |
| tree | e930e86d52114de16148de08b917c974cb874669 /src/test/rustdoc-ui | |
| parent | 98e7a4e7844f5099ec7e15228a42440931072e53 (diff) | |
| parent | 45ccd50d0e52e006fdd81f854b4cd711ac439e85 (diff) | |
| download | rust-3ca197e89c9affc76e79f0421e1bb9d65a8ec855.tar.gz rust-3ca197e89c9affc76e79f0421e1bb9d65a8ec855.zip | |
Rollup merge of #83865 - camelid:disamb-err-fix, r=jyn514
Don't report disambiguator error if link would have been ignored Fixes #83859. 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. r? ````@jyn514````
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/email-address-localhost.rs | 6 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs b/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs new file mode 100644 index 00000000000..417618c7458 --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs @@ -0,0 +1,6 @@ +#![deny(warnings)] + +//! Email me at <hello@localhost>. +//~^ ERROR unknown disambiguator `hello` + +//! This should *not* warn: <hello@example.com>. diff --git a/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr b/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr new file mode 100644 index 00000000000..de215b2163b --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr @@ -0,0 +1,15 @@ +error: unknown disambiguator `hello` + --> $DIR/email-address-localhost.rs:3:18 + | +LL | //! Email me at <hello@localhost>. + | ^^^^^ + | +note: the lint level is defined here + --> $DIR/email-address-localhost.rs:1:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]` + +error: aborting due to previous error + |
