add warning for missing docs

This commit is contained in:
dylan_DPC 2018-08-23 01:56:39 +05:30
parent a6201f9a2b
commit 8fbcb9c53c
2 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@
// compile-pass
#![warn(unused_imports)]
#![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
#![warn(missing_docs)]
#[macro_use]
extern crate lints_in_foreign_macros;
@ -25,5 +25,6 @@ macro_rules! foo {
mod b { bar!(); }
mod c { baz!(use std::string::ToString;); } //~ WARN: unused import
mod d { baz2!(use std::string::ToString;); } //~ WARN: unused import
mod e { baz!(pub fn undocumented() {}); }//~ WARN: missing documentation for a function
fn main() {}

View File

@ -29,17 +29,17 @@ warning: missing documentation for crate
--> $DIR/lints-in-foreign-macros.rs:14:1
|
LL | / #![warn(unused_imports)]
LL | | #![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
LL | | #![warn(missing_docs)]
LL | |
LL | | #[macro_use]
... |
LL | |
LL | | fn main() {}
LL | | fn main() {} //~ WARN: missing documentation for crate [missing_docs]
| |____________^
|
note: lint level defined here
--> $DIR/lints-in-foreign-macros.rs:15:9
|
LL | #![warn(missing_docs)] //~ WARN: missing documentation for crate [missing_docs]
LL | #![warn(missing_docs)]
| ^^^^^^^^^^^^