Add test for reexported items lints
This commit is contained in:
parent
130fd1a970
commit
7c0d576c59
8
src/test/rustdoc-ui/pub-export-lint.rs
Normal file
8
src/test/rustdoc-ui/pub-export-lint.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#![deny(broken_intra_doc_links)]
|
||||
|
||||
/// [somewhere]
|
||||
//~^ ERROR unresolved link to `somewhere`
|
||||
pub use std::str::*;
|
||||
/// [aloha]
|
||||
//~^ ERROR unresolved link to `aloha`
|
||||
pub use std::task::RawWakerVTable;
|
23
src/test/rustdoc-ui/pub-export-lint.stderr
Normal file
23
src/test/rustdoc-ui/pub-export-lint.stderr
Normal file
@ -0,0 +1,23 @@
|
||||
error: unresolved link to `somewhere`
|
||||
--> $DIR/pub-export-lint.rs:3:6
|
||||
|
|
||||
LL | /// [somewhere]
|
||||
| ^^^^^^^^^ the module `pub_export_lint` contains no item named `somewhere`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/pub-export-lint.rs:1:9
|
||||
|
|
||||
LL | #![deny(broken_intra_doc_links)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: unresolved link to `aloha`
|
||||
--> $DIR/pub-export-lint.rs:6:6
|
||||
|
|
||||
LL | /// [aloha]
|
||||
| ^^^^^ the module `pub_export_lint` contains no item named `aloha`
|
||||
|
|
||||
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
Loading…
Reference in New Issue
Block a user