]> git.lizzy.rs Git - rust.git/blobdiff - tests/lint_message_convention.rs
removing unsafe from test fn's && renaming shrink to sugg_span
[rust.git] / tests / lint_message_convention.rs
index 8c07c5b242f15a059c761c74ef2eb3daa83d2f43..b4d94dc983fec11fecc2efc20e8dbf006193ae07 100644 (file)
@@ -1,3 +1,6 @@
+#![cfg_attr(feature = "deny-warnings", deny(warnings))]
+#![warn(rust_2018_idioms, unused_lifetimes)]
+
 use std::ffi::OsStr;
 use std::path::PathBuf;
 
@@ -89,16 +92,18 @@ fn lint_message_convention() {
         .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");