Skip to content

Commit bfdfc66

Browse files
Add test to ensure that external items aren't lint-checked
1 parent 31d275e commit bfdfc66

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

src/librustdoc/clean/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,10 +1655,10 @@ pub struct Impl {
16551655
#[derive(Clone, Debug)]
16561656
pub enum Import {
16571657
// use source as str;
1658-
// The bool indicates wether it imports a macro or not.
1658+
// The bool indicates whether it imports a macro or not.
16591659
Simple(String, ImportSource, bool),
16601660
// use source::*;
1661-
// The bool indicates wether this is from an import.
1661+
// The bool indicates whether this is from an import.
16621662
Glob(ImportSource, bool),
16631663
}
16641664

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#![crate_name = "intra_doc_broken"]
2+
3+
/// [not_found]
4+
pub fn foo() {}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// aux-build:intra-doc-broken.rs
2+
// check-pass
3+
4+
#![deny(broken_intra_doc_links)]
5+
6+
extern crate intra_doc_broken;
7+
8+
pub use intra_doc_broken::foo;

src/test/rustdoc-ui/pub-export-lint.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error: unresolved link to `somewhere`
22
--> $DIR/pub-export-lint.rs:3:6
33
|
4-
LL | /// [somewhere]
5-
| ^^^^^^^^^ the module `pub_export_lint` contains no item named `somewhere`
4+
LL | /// [aloha]
5+
| ^^^^^ no item named `aloha` in scope
66
|
77
note: the lint level is defined here
88
--> $DIR/pub-export-lint.rs:1:9

0 commit comments

Comments
 (0)