]> git.lizzy.rs Git - rust.git/blobdiff - tests/lint_message_convention.rs
Merge remote-tracking branch 'upstream/master' into rustup
[rust.git] / tests / lint_message_convention.rs
index c3aae1a9aa2d01992ee0c00b6c847bc869b033d0..abd0d1bc5934f027698ce072d663157866e633dd 100644 (file)
@@ -19,7 +19,7 @@ fn new(path: PathBuf) -> Self {
         // we don't want the first letter after "error: ", "help: " ... to be capitalized
         // also no punctuation (except for "?" ?) at the end of a line
         static REGEX_SET: LazyLock<RegexSet> = LazyLock::new(|| {
-            RegexSet::new(&[
+            RegexSet::new([
                 r"error: [A-Z]",
                 r"help: [A-Z]",
                 r"warning: [A-Z]",
@@ -37,7 +37,7 @@ fn new(path: PathBuf) -> Self {
         // 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 "?"
         static EXCEPTIONS_SET: LazyLock<RegexSet> = LazyLock::new(|| {
-            RegexSet::new(&[
+            RegexSet::new([
                 r"\.\.\.$",
                 r".*C-like enum variant discriminant is not portable to 32-bit targets",
                 r".*Intel x86 assembly syntax used",
@@ -102,7 +102,7 @@ fn lint_message_convention() {
             "error: the test '{}' contained the following nonconforming lines :",
             message.path.display()
         );
-        message.bad_lines.iter().for_each(|line| eprintln!("{}", line));
+        message.bad_lines.iter().for_each(|line| eprintln!("{line}"));
         eprintln!("\n\n");
     }