-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: point at span in
include_str!
-ed md file
- Loading branch information
Showing
10 changed files
with
121 additions
and
42 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
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,10 @@ | ||
HEADS UP! https://example.com MUST SHOW UP IN THE STDERR FILE! | ||
|
||
Normally, a line with errors on it will also have a comment | ||
marking it up as something that needs to generate an error. | ||
|
||
The test harness doesn't gather hot comments from this file. | ||
Rustdoc will generate an error for the line, and the `.stderr` | ||
snapshot includes this error, but Compiletest doesn't see it. | ||
|
||
If the stderr file changes, make sure the warning points at the URL! |
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 @@ | ||
// https://github.com/rust-lang/rust/issues/118549 | ||
// | ||
// HEADS UP! | ||
// | ||
// Normally, a line with errors on it will also have a comment | ||
// marking it up as something that needs to generate an error. | ||
// | ||
// The test harness doesn't gather hot comments from the `.md` file. | ||
// Rustdoc will generate an error for the line, and the `.stderr` | ||
// snapshot includes this error, but Compiletest doesn't see it. | ||
// | ||
// If the stderr file changes, make sure the warning points at the URL! | ||
|
||
#![deny(rustdoc::bare_urls)] | ||
#![doc=include_str!("auxiliary/include-str-bare-urls.md")] |
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: this URL is not a hyperlink | ||
--> $DIR/auxiliary/include-str-bare-urls.md:1:11 | ||
| | ||
LL | HEADS UP! https://example.com MUST SHOW UP IN THE STDERR FILE! | ||
| ^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://example.com>` | ||
| | ||
= note: bare URLs are not automatically turned into clickable links | ||
note: the lint level is defined here | ||
--> $DIR/include-str-bare-urls.rs:14:9 | ||
| | ||
LL | #![deny(rustdoc::bare_urls)] | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 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
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
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