-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: Fix resolution of
crate
-relative paths in doc links
- Loading branch information
1 parent
ffaf6f0
commit f5ee822
Showing
6 changed files
with
53 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#![deny(rustdoc::broken_intra_doc_links)] | ||
|
||
/// [crate::DoesNotExist] | ||
//~^ ERROR unresolved link to `crate::DoesNotExist` | ||
pub struct Item; |
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,14 @@ | ||
error: unresolved link to `crate::DoesNotExist` | ||
--> $DIR/crate-nonexistent.rs:3:6 | ||
| | ||
LL | /// [crate::DoesNotExist] | ||
| ^^^^^^^^^^^^^^^^^^^ no item named `DoesNotExist` in module `crate_nonexistent` | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/crate-nonexistent.rs:1:9 | ||
| | ||
LL | #![deny(rustdoc::broken_intra_doc_links)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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,17 @@ | ||
pub mod io { | ||
pub trait Read { | ||
fn read(&mut self); | ||
} | ||
} | ||
|
||
pub mod bufreader { | ||
// @has crate_relative_assoc/bufreader/index.html '//a/@href' 'struct.TcpStream.html#method.read' | ||
//! [`crate::TcpStream::read`] | ||
use crate::io::Read; | ||
} | ||
|
||
pub struct TcpStream; | ||
|
||
impl crate::io::Read for TcpStream { | ||
fn read(&mut self) {} | ||
} |