forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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#76082 - jyn514:top-level-links, r=ollie27,G…
…uillaumeGomez Fix intra-doc links on pub re-exports Partial fix for rust-lang#76073 - This removes the incorrect error, but doesn't show the documentation anywhere. r? @GuillaumeGomez
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#![crate_name = "inner"] | ||
|
||
/// Documentation, including a link to [std::ptr] | ||
pub fn f() {} |
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,27 @@ | ||
// aux-build: intra-link-pub-use.rs | ||
#![deny(broken_intra_doc_links)] | ||
#![crate_name = "outer"] | ||
|
||
extern crate inner; | ||
|
||
/// [mod@std::env] [g] | ||
|
||
// FIXME: This can't be tested because rustdoc doesn't show documentation on pub re-exports. | ||
// Until then, comment out the `htmldocck` test. | ||
// This test still does something; namely check that no incorrect errors are emitted when | ||
// documenting the re-export. | ||
|
||
// @has outer/index.html | ||
// @ has - '//a[@href="https://doc.rust-lang.org/nightly/std/env/fn.var.html"]' "std::env" | ||
// @ has - '//a[@href="../outer/fn.f.html"]' "g" | ||
pub use f as g; | ||
|
||
// FIXME: same as above | ||
/// [std::env] | ||
extern crate self as _; | ||
|
||
// Make sure the documentation is actually correct by documenting an inlined re-export | ||
/// [mod@std::env] | ||
// @has outer/fn.f.html | ||
// @has - '//a[@href="https://doc.rust-lang.org/nightly/std/env/index.html"]' "std::env" | ||
pub use inner::f; |