summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/string_lit_chars_any.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/tools/clippy/tests/ui/string_lit_chars_any.stderr
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/string_lit_chars_any.stderr')
-rw-r--r--src/tools/clippy/tests/ui/string_lit_chars_any.stderr31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/tools/clippy/tests/ui/string_lit_chars_any.stderr b/src/tools/clippy/tests/ui/string_lit_chars_any.stderr
index ff951b73d..09c4f02eb 100644
--- a/src/tools/clippy/tests/ui/string_lit_chars_any.stderr
+++ b/src/tools/clippy/tests/ui/string_lit_chars_any.stderr
@@ -1,57 +1,58 @@
error: usage of `.chars().any(...)` to check if a char matches any from a string literal
- --> $DIR/string_lit_chars_any.rs:19:5
+ --> $DIR/string_lit_chars_any.rs:18:5
|
-LL | "//.+*?()|[]{}^$#&-~".chars().any(|x| x == c);
+LL | "\\.+*?()|[]{}^$#&-~".chars().any(|x| x == c);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::string-lit-chars-any` implied by `-D warnings`
+ = help: to override `-D warnings` add `#[allow(clippy::string_lit_chars_any)]`
help: use `matches!(...)` instead
|
-LL | matches!(c, '//' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
+LL | matches!(c, '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: usage of `.chars().any(...)` to check if a char matches any from a string literal
- --> $DIR/string_lit_chars_any.rs:20:5
+ --> $DIR/string_lit_chars_any.rs:19:5
|
-LL | r#"/.+*?()|[]{}^$#&-~"#.chars().any(|x| x == c);
+LL | r#"\.+*?()|[]{}^$#&-~"#.chars().any(|x| x == c);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use `matches!(...)` instead
|
-LL | matches!(c, '//' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
+LL | matches!(c, '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: usage of `.chars().any(...)` to check if a char matches any from a string literal
- --> $DIR/string_lit_chars_any.rs:21:5
+ --> $DIR/string_lit_chars_any.rs:20:5
|
-LL | "//.+*?()|[]{}^$#&-~".chars().any(|x| c == x);
+LL | "\\.+*?()|[]{}^$#&-~".chars().any(|x| c == x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use `matches!(...)` instead
|
-LL | matches!(c, '//' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
+LL | matches!(c, '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: usage of `.chars().any(...)` to check if a char matches any from a string literal
- --> $DIR/string_lit_chars_any.rs:22:5
+ --> $DIR/string_lit_chars_any.rs:21:5
|
-LL | r#"/.+*?()|[]{}^$#&-~"#.chars().any(|x| c == x);
+LL | r#"\.+*?()|[]{}^$#&-~"#.chars().any(|x| c == x);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use `matches!(...)` instead
|
-LL | matches!(c, '//' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
+LL | matches!(c, '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: usage of `.chars().any(...)` to check if a char matches any from a string literal
- --> $DIR/string_lit_chars_any.rs:24:5
+ --> $DIR/string_lit_chars_any.rs:23:5
|
-LL | "//.+*?()|[]{}^$#&-~".chars().any(|x| { x == c });
+LL | "\\.+*?()|[]{}^$#&-~".chars().any(|x| { x == c });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: use `matches!(...)` instead
|
-LL | matches!(c, '//' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
+LL | matches!(c, '\\' | '.' | '+' | '*' | '?' | '(' | ')' | '|' | '[' | ']' | '{' | '}' | '^' | '$' | '#' | '&' | '-' | '~');
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 5 previous errors