forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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#94478 - GuillaumeGomez:macro-generated-intr…
…a-doc-link, r=notriddle Fix panic when handling intra doc links generated from macro Fixes rust-lang#78591. Fixes rust-lang#92789. r? ``@notriddle``
- Loading branch information
Showing
5 changed files
with
34 additions
and
1 deletion.
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 @@ | ||
//! [`long_cat`] is really long |
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,12 @@ | ||
// check-pass | ||
|
||
macro_rules! m { | ||
() => { | ||
/// A | ||
//~^ WARNING | ||
#[path = "auxiliary/module_macro_doc.rs"] | ||
pub mod mymodule; | ||
} | ||
} | ||
|
||
m!(); |
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,20 @@ | ||
warning: unresolved link to `long_cat` | ||
--> $DIR/macro-docs.rs:5:9 | ||
| | ||
LL | /// A | ||
| ^^^^^ | ||
... | ||
LL | m!(); | ||
| ---- in this macro invocation | ||
| | ||
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default | ||
= note: the link appears in this line: | ||
|
||
[`long_cat`] is really long | ||
^^^^^^^^^^ | ||
= note: no item named `long_cat` in scope | ||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` | ||
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
warning: 1 warning emitted | ||
|
Empty file.