add warning for missing docs
This commit is contained in:
parent
a6201f9a2b
commit
8fbcb9c53c
@ -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() {}
|
||||
|
@ -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)]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user