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#72771 - jyn514:rustdoc, r=Manishearth
Warn if linking to a private item Closes rust-lang#72769 r? @GuillaumeGomez
- Loading branch information
Showing
10 changed files
with
98 additions
and
23 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
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 @@ | ||
warning: `[DontDocMe]` public documentation for `DocMe` links to a private item | ||
--> $DIR/intra-links-private.rs:6:11 | ||
| | ||
LL | /// docs [DontDocMe] | ||
| ^^^^^^^^^ this item is private | ||
| | ||
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
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 @@ | ||
// check-pass | ||
// revisions: public private | ||
// [private]compile-flags: --document-private-items | ||
#![cfg_attr(private, deny(intra_doc_resolution_failure))] | ||
|
||
/// docs [DontDocMe] | ||
//[public]~^ WARNING `[DontDocMe]` public documentation for `DocMe` links to a private item | ||
// FIXME: for [private] we should also make sure the link was actually generated | ||
pub struct DocMe; | ||
struct DontDocMe; |
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 @@ | ||
// ignore-test | ||
// check-pass | ||
|
||
/// docs [label][with#anchor#error] | ||
//~^ WARNING has an issue with the link anchor | ||
pub struct S; |
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 @@ | ||
warning: `[with#anchor#error]` has an issue with the link anchor. | ||
--> $DIR/reference-link-has-one-warning.rs:3:18 | ||
| | ||
LL | /// docs [label][with#anchor#error] | ||
| ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link | ||
| | ||
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|