-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Deprecated doc intra link #150721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rust-bors
merged 2 commits into
rust-lang:main
from
folkertdev:deprecated-doc-intra-link
Jan 9, 2026
+185
−21
Merged
Deprecated doc intra link #150721
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| //@ has deprecated/struct.A.html '//a[@href="{{channel}}/core/ops/range/struct.Range.html#structfield.start"]' 'start' | ||
| //@ has deprecated/struct.B1.html '//a[@href="{{channel}}/std/io/error/enum.ErrorKind.html#variant.NotFound"]' 'not_found' | ||
| //@ has deprecated/struct.B2.html '//a[@href="{{channel}}/std/io/error/enum.ErrorKind.html#variant.NotFound"]' 'not_found' | ||
|
|
||
| #[deprecated = "[start][std::ops::Range::start]"] | ||
| pub struct A; | ||
|
|
||
| #[deprecated(since = "0.0.0", note = "[not_found][std::io::ErrorKind::NotFound]")] | ||
| pub struct B1; | ||
|
|
||
| #[deprecated(note = "[not_found][std::io::ErrorKind::NotFound]", since = "0.0.0")] | ||
| pub struct B2; |
This file contains hidden or 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 @@ | ||
| #![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; |
This file contains hidden or 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,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 | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the final argument switched from
truetofalsehere, which keeps the other attributes. That probably has perf consequences, but I did not want to just make up a doc fragment for the deprecation note.