X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Flint_message_convention.rs;h=b4d94dc983fec11fecc2efc20e8dbf006193ae07;hb=7a2cabb431c25682bf74fd9396f2fb14992c0ac2;hp=3f754c255b749b2ff2687ceb70252c6beacc1e8f;hpb=f2f2a005b4efd3e44ac6a02ea2b9660d28401679;p=rust.git diff --git a/tests/lint_message_convention.rs b/tests/lint_message_convention.rs index 3f754c255b7..b4d94dc983f 100644 --- a/tests/lint_message_convention.rs +++ b/tests/lint_message_convention.rs @@ -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,14 +92,14 @@ 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."