mirror of https://github.com/rust-lang/rust.git
Add test to ensure that external items aren't lint-checked
This commit is contained in:
parent
31d275e587
commit
bfdfc66f73
|
@ -1655,10 +1655,10 @@ pub struct Impl {
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum Import {
|
pub enum Import {
|
||||||
// use source as str;
|
// use source as str;
|
||||||
// The bool indicates wether it imports a macro or not.
|
// The bool indicates whether it imports a macro or not.
|
||||||
Simple(String, ImportSource, bool),
|
Simple(String, ImportSource, bool),
|
||||||
// use source::*;
|
// use source::*;
|
||||||
// The bool indicates wether this is from an import.
|
// The bool indicates whether this is from an import.
|
||||||
Glob(ImportSource, bool),
|
Glob(ImportSource, bool),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#![crate_name = "intra_doc_broken"]
|
||||||
|
|
||||||
|
/// [not_found]
|
||||||
|
pub fn foo() {}
|
|
@ -0,0 +1,8 @@
|
||||||
|
// aux-build:intra-doc-broken.rs
|
||||||
|
// check-pass
|
||||||
|
|
||||||
|
#![deny(broken_intra_doc_links)]
|
||||||
|
|
||||||
|
extern crate intra_doc_broken;
|
||||||
|
|
||||||
|
pub use intra_doc_broken::foo;
|
|
@ -1,8 +1,8 @@
|
||||||
error: unresolved link to `somewhere`
|
error: unresolved link to `somewhere`
|
||||||
--> $DIR/pub-export-lint.rs:3:6
|
--> $DIR/pub-export-lint.rs:3:6
|
||||||
|
|
|
|
||||||
LL | /// [somewhere]
|
LL | /// [aloha]
|
||||||
| ^^^^^^^^^ the module `pub_export_lint` contains no item named `somewhere`
|
| ^^^^^ no item named `aloha` in scope
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/pub-export-lint.rs:1:9
|
--> $DIR/pub-export-lint.rs:1:9
|
||||||
|
|
Loading…
Reference in New Issue