Skip to content

[beta] Rollup backports #53700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 25, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add warning for missing docs
  • Loading branch information
Dylan-DPC authored and pietroalbini committed Aug 25, 2018
commit 073513102378d425c6e2fd3f32cc8d28d2eb367c
3 changes: 2 additions & 1 deletion src/test/ui/lint/lints-in-foreign-macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,5 +25,6 @@ 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

fn main() {}
6 changes: 3 additions & 3 deletions src/test/ui/lint/lints-in-foreign-macros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
| ^^^^^^^^^^^^