]> git.lizzy.rs Git - rust.git/blobdiff - tests/lint_message_convention.rs
merge rustc history
[rust.git] / tests / lint_message_convention.rs
index c3aae1a9aa2d01992ee0c00b6c847bc869b033d0..2e0f4e76075b38a1eaec8e6380001dcd5109886a 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",