forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#83865 - camelid:disamb-err-fix, r=jyn514
Don't report disambiguator error if link would have been ignored Fixes rust-lang#83859. This prevents us from warning on links such as `<[email protected]>`. 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``
- Loading branch information
Showing
4 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#![deny(warnings)] | ||
|
||
//! Email me at <hello@localhost>. | ||
//~^ ERROR unknown disambiguator `hello` | ||
|
||
//! This should *not* warn: <[email protected]>. |
15 changes: 15 additions & 0 deletions
15
src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//! Email me at <[email protected]>. | ||
//! Email me at <[email protected]>. | ||
//! Email me at <hello@localhost> (this warns but will still become a link). | ||
// @has email_address/index.html '//a[@href="mailto:[email protected]"]' '[email protected]' | ||
// @has email_address/index.html '//a[@href="mailto:[email protected]"]' '[email protected]' | ||
// @has email_address/index.html '//a[@href="mailto:hello@localhost"]' 'hello@localhost' |