+#![cfg_attr(feature = "deny-warnings", deny(warnings))]
+#![warn(rust_2018_idioms, unused_lifetimes)]
+
use std::ffi::OsStr;
use std::path::PathBuf;
])
.unwrap();
- // sometimes the first character is capitalized and it is legal (like in "Iterator...") or
+ // sometimes the first character is capitalized and it is legal (like in "C-like enum variants") or
// we want to ask a question ending in "?"
let exceptions_set: RegexSet = RegexSet::new(&[
r".*C-like enum variant discriminant is not portable to 32-bit targets",
.filter(|message| !message.bad_lines.is_empty())
.collect();
- bad_tests.iter().for_each(|message| {
+ for message in &bad_tests {
eprintln!(
"error: the test '{}' contained the following nonconforming lines :",
message.path.display()
);
message.bad_lines.iter().for_each(|line| eprintln!("{}", line));
eprintln!("\n\n");
- });
+ }
- eprintln!("\n\n\nLint message should not start with a capital letter and should not have punctuation at the end of the message unless multiple sentences are needed.");
+ eprintln!(
+ "\n\n\nLint message should not start with a capital letter and should not have punctuation at the end of the message unless multiple sentences are needed."
+ );
eprintln!("Check out the rustc-dev-guide for more information:");
eprintln!("https://rustc-dev-guide.rust-lang.org/diagnostics.html#diagnostic-structure\n\n\n");