2018-03-13 14:02:40 +00:00
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:19:45
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let pipe_in_wrong_position = Regex::new("|");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: the regex is unlikely to be useful as it is
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::trivial-regex` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::trivial_regex)]`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:21:60
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let pipe_in_wrong_position_builder = RegexBuilder::new("|");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^
|
2018-03-13 14:02:40 +00:00
|
|
|
|
|
|
|
|
= help: the regex is unlikely to be useful as it is
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
error: regex syntax error: invalid character class range, the start must be <= the end
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:23:42
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let wrong_char_ranice = Regex::new("[z-a]");
|
2018-03-13 14:02:40 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::invalid-regex` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::invalid_regex)]`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
error: regex syntax error: invalid character class range, the start must be <= the end
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:26:37
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let some_unicode = Regex::new("[é-è]");
|
2018-03-13 14:02:40 +00:00
|
|
|
| ^^^
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
|
|
|
(
|
|
|
|
^
|
|
|
|
error: unclosed group
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:29:33
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let some_regex = Regex::new(OPENING_PAREN);
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:31:53
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let binary_pipe_in_wrong_position = BRegex::new("|");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^
|
2018-03-13 14:02:40 +00:00
|
|
|
|
|
|
|
|
= help: the regex is unlikely to be useful as it is
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
|
|
|
(
|
|
|
|
^
|
|
|
|
error: unclosed group
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:33:41
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let some_binary_regex = BRegex::new(OPENING_PAREN);
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
|
|
|
(
|
|
|
|
^
|
|
|
|
error: unclosed group
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:34:56
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
|
|
|
(
|
|
|
|
^
|
|
|
|
error: unclosed group
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:46:37
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | let set_error = RegexSet::new(&[OPENING_PAREN, r"[a-z]+\.(com|org|net)"]);
|
2018-12-10 05:27:19 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
|
|
|
(
|
|
|
|
^
|
|
|
|
error: unclosed group
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:47:39
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | let bset_error = BRegexSet::new(&[OPENING_PAREN, r"[a-z]+\.(com|org|net)"]);
|
2018-12-10 05:27:19 +00:00
|
|
|
| ^^^^^^^^^^^^^
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2023-02-10 13:01:19 +00:00
|
|
|
error: regex parse error:
|
2023-08-24 19:32:12 +00:00
|
|
|
\b\c
|
2023-02-10 13:01:19 +00:00
|
|
|
^^
|
|
|
|
error: unrecognized escape sequence
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:54:42
|
2023-02-10 13:01:19 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | let escaped_string_span = Regex::new("\\b\\c");
|
2023-02-10 13:01:19 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using a raw string literal: `r".."`
|
|
|
|
|
|
|
|
error: regex syntax error: duplicate flag
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:56:34
|
2023-02-10 13:01:19 +00:00
|
|
|
|
|
|
|
|
LL | let aux_span = Regex::new("(?ixi)");
|
|
|
|
| ^ ^
|
|
|
|
|
2023-06-02 09:41:57 +00:00
|
|
|
error: regex syntax error: pattern can match invalid UTF-8
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:62:53
|
2023-06-02 09:41:57 +00:00
|
|
|
|
|
|
|
|
LL | let invalid_utf8_should_lint = Regex::new("(?-u).");
|
|
|
|
| ^
|
|
|
|
|
2017-08-01 15:54:21 +00:00
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:67:33
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_eq = Regex::new("^foobar$");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `==` on `str`s
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:70:48
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_eq_builder = RegexBuilder::new("^foobar$");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `==` on `str`s
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:73:42
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_starts_with = Regex::new("^foobar");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::starts_with`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:76:40
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_ends_with = Regex::new("foobar$");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::ends_with`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:79:39
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_contains = Regex::new("foobar");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::contains`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:82:39
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::contains`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:85:40
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | let trivial_backslash = Regex::new("a\\.b");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::contains`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:89:36
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_empty = Regex::new("");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: the regex is unlikely to be useful as it is
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:92:36
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_empty = Regex::new("^");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: the regex is unlikely to be useful as it is
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:95:36
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let trivial_empty = Regex::new("^$");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::is_empty`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
|
|
error: trivial regex
|
2023-09-15 11:07:34 +00:00
|
|
|
--> $DIR/regex.rs:98:44
|
2017-08-01 15:54:21 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | let binary_trivial_empty = BRegex::new("^$");
|
2017-08-01 15:54:21 +00:00
|
|
|
| ^^^^
|
|
|
|
|
|
2018-03-13 14:02:40 +00:00
|
|
|
= help: consider using `str::is_empty`
|
2017-08-01 15:54:21 +00:00
|
|
|
|
2023-06-02 09:41:57 +00:00
|
|
|
error: aborting due to 24 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|