render intra-doc links in the #[deprectated] note
This commit is contained in:
parent
64c78f6e74
commit
3be74a7441
11 changed files with 179 additions and 22 deletions
10
tests/rustdoc-ui/intra-doc/deprecated.rs
Normal file
10
tests/rustdoc-ui/intra-doc/deprecated.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#![deny(rustdoc::broken_intra_doc_links)]
|
||||
|
||||
#[deprecated = "[broken cross-reference](TypeAlias::hoge)"] //~ ERROR
|
||||
pub struct A;
|
||||
|
||||
#[deprecated(since = "0.0.0", note = "[broken cross-reference](TypeAlias::hoge)")] //~ ERROR
|
||||
pub struct B1;
|
||||
|
||||
#[deprecated(note = "[broken cross-reference](TypeAlias::hoge)", since = "0.0.0")] //~ ERROR
|
||||
pub struct B2;
|
||||
43
tests/rustdoc-ui/intra-doc/deprecated.stderr
Normal file
43
tests/rustdoc-ui/intra-doc/deprecated.stderr
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
error: unresolved link to `TypeAlias::hoge`
|
||||
--> $DIR/deprecated.rs:3:1
|
||||
|
|
||||
LL | #[deprecated = "[broken cross-reference](TypeAlias::hoge)"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: the link appears in this line:
|
||||
|
||||
[broken cross-reference](TypeAlias::hoge)
|
||||
^^^^^^^^^^^^^^^
|
||||
= note: no item named `TypeAlias` in scope
|
||||
note: the lint level is defined here
|
||||
--> $DIR/deprecated.rs:1:9
|
||||
|
|
||||
LL | #![deny(rustdoc::broken_intra_doc_links)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unresolved link to `TypeAlias::hoge`
|
||||
--> $DIR/deprecated.rs:6:1
|
||||
|
|
||||
LL | #[deprecated(since = "0.0.0", note = "[broken cross-reference](TypeAlias::hoge)")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: the link appears in this line:
|
||||
|
||||
[broken cross-reference](TypeAlias::hoge)
|
||||
^^^^^^^^^^^^^^^
|
||||
= note: no item named `TypeAlias` in scope
|
||||
|
||||
error: unresolved link to `TypeAlias::hoge`
|
||||
--> $DIR/deprecated.rs:9:1
|
||||
|
|
||||
LL | #[deprecated(note = "[broken cross-reference](TypeAlias::hoge)", since = "0.0.0")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: the link appears in this line:
|
||||
|
||||
[broken cross-reference](TypeAlias::hoge)
|
||||
^^^^^^^^^^^^^^^
|
||||
= note: no item named `TypeAlias` in scope
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue