Skip to content

Commit 0735131

Browse files
Dylan-DPCpietroalbini
authored andcommitted
add warning for missing docs
1 parent 73ea867 commit 0735131

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/test/ui/lint/lints-in-foreign-macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// compile-pass
1313

1414
#![warn(unused_imports)]
15-
#![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
15+
#![warn(missing_docs)]
1616

1717
#[macro_use]
1818
extern crate lints_in_foreign_macros;
@@ -25,5 +25,6 @@ mod a { foo!(); }
2525
mod b { bar!(); }
2626
mod c { baz!(use std::string::ToString;); } //~ WARN: unused import
2727
mod d { baz2!(use std::string::ToString;); } //~ WARN: unused import
28+
mod e { baz!(pub fn undocumented() {}); }//~ WARN: missing documentation for a function
2829

2930
fn main() {}

src/test/ui/lint/lints-in-foreign-macros.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ warning: missing documentation for crate
2929
--> $DIR/lints-in-foreign-macros.rs:14:1
3030
|
3131
LL | / #![warn(unused_imports)]
32-
LL | | #![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
32+
LL | | #![warn(missing_docs)]
3333
LL | |
3434
LL | | #[macro_use]
3535
... |
3636
LL | |
37-
LL | | fn main() {}
37+
LL | | fn main() {} //~ WARN: missing documentation for crate [missing_docs]
3838
| |____________^
3939
|
4040
note: lint level defined here
4141
--> $DIR/lints-in-foreign-macros.rs:15:9
4242
|
43-
LL | #![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
43+
LL | #![warn(missing_docs)]
4444
| ^^^^^^^^^^^^
4545

0 commit comments

Comments
 (0)