fix testcase
This commit is contained in:
parent
8fbcb9c53c
commit
747722e444
2 changed files with 18 additions and 5 deletions
|
|
@ -11,7 +11,7 @@
|
|||
// aux-build:lints-in-foreign-macros.rs
|
||||
// compile-pass
|
||||
|
||||
#![warn(unused_imports)]
|
||||
#![warn(unused_imports)] //~ missing documentation for crate [missing_docs]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
@ -25,6 +25,7 @@ mod a { 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
|
||||
baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function
|
||||
baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ LL | mod a { foo!(); }
|
|||
note: lint level defined here
|
||||
--> $DIR/lints-in-foreign-macros.rs:14:9
|
||||
|
|
||||
LL | #![warn(unused_imports)]
|
||||
LL | #![warn(unused_imports)] //~ missing documentation for crate [missing_docs]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
warning: unused import: `std::string::ToString`
|
||||
|
|
@ -28,13 +28,13 @@ LL | mod d { baz2!(use std::string::ToString;); } //~ WARN: unused import
|
|||
warning: missing documentation for crate
|
||||
--> $DIR/lints-in-foreign-macros.rs:14:1
|
||||
|
|
||||
LL | / #![warn(unused_imports)]
|
||||
LL | / #![warn(unused_imports)] //~ missing documentation for crate [missing_docs]
|
||||
LL | | #![warn(missing_docs)]
|
||||
LL | |
|
||||
LL | | #[macro_use]
|
||||
... |
|
||||
LL | |
|
||||
LL | | fn main() {} //~ WARN: missing documentation for crate [missing_docs]
|
||||
LL | | fn main() {}
|
||||
| |____________^
|
||||
|
|
||||
note: lint level defined here
|
||||
|
|
@ -43,3 +43,15 @@ note: lint level defined here
|
|||
LL | #![warn(missing_docs)]
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
warning: missing documentation for a function
|
||||
--> $DIR/lints-in-foreign-macros.rs:28:6
|
||||
|
|
||||
LL | baz!(pub fn undocumented() {}); //~ WARN: missing documentation for a function
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: missing documentation for a function
|
||||
--> $DIR/lints-in-foreign-macros.rs:29:7
|
||||
|
|
||||
LL | baz2!(pub fn undocumented2() {}); //~ WARN: missing documentation for a function
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue