rust-clippy/tests/ui/regex.stderr

166 lines
4.8 KiB
Text
Raw Normal View History

2017-08-01 15:54:21 +00:00
error: regex syntax error: empty alternate
--> $DIR/regex.rs:16:45
|
16 | let pipe_in_wrong_position = Regex::new("|");
| ^^^
|
= note: `-D invalid-regex` implied by `-D warnings`
error: regex syntax error: empty alternate
--> $DIR/regex.rs:17:60
|
17 | let pipe_in_wrong_position_builder = RegexBuilder::new("|");
| ^^^
error: regex syntax error: invalid character class range
--> $DIR/regex.rs:18:40
|
18 | let wrong_char_ranice = Regex::new("[z-a]");
| ^^^^^^^
error: regex syntax error: invalid character class range
--> $DIR/regex.rs:19:35
|
19 | let some_unicode = Regex::new("[é-è]");
| ^^^^^^^
error: regex syntax error on position 0: unclosed parenthesis
--> $DIR/regex.rs:21:33
|
21 | let some_regex = Regex::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
error: regex syntax error: empty alternate
--> $DIR/regex.rs:23:53
|
23 | let binary_pipe_in_wrong_position = BRegex::new("|");
| ^^^
error: regex syntax error on position 0: unclosed parenthesis
--> $DIR/regex.rs:24:41
|
24 | let some_binary_regex = BRegex::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed parenthesis
--> $DIR/regex.rs:25:56
|
25 | let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed parenthesis
--> $DIR/regex.rs:40:9
|
40 | OPENING_PAREN,
| ^^^^^^^^^^^^^
error: regex syntax error on position 0: unclosed parenthesis
--> $DIR/regex.rs:44:9
|
44 | OPENING_PAREN,
| ^^^^^^^^^^^^^
error: regex syntax error: unrecognized escape sequence
--> $DIR/regex.rs:48:45
|
48 | let raw_string_error = Regex::new(r"[...//...]");
| ^
error: regex syntax error: unrecognized escape sequence
--> $DIR/regex.rs:49:46
|
49 | let raw_string_error = Regex::new(r#"[...//...]"#);
| ^
2017-08-01 15:54:21 +00:00
error: trivial regex
--> $DIR/regex.rs:53:33
2017-08-01 15:54:21 +00:00
|
53 | let trivial_eq = Regex::new("^foobar$");
2017-08-01 15:54:21 +00:00
| ^^^^^^^^^^
|
= note: `-D trivial-regex` implied by `-D warnings`
= help: consider using consider using `==` on `str`s
error: trivial regex
--> $DIR/regex.rs:55:48
2017-08-01 15:54:21 +00:00
|
55 | let trivial_eq_builder = RegexBuilder::new("^foobar$");
2017-08-01 15:54:21 +00:00
| ^^^^^^^^^^
|
= help: consider using consider using `==` on `str`s
error: trivial regex
--> $DIR/regex.rs:57:42
2017-08-01 15:54:21 +00:00
|
57 | let trivial_starts_with = Regex::new("^foobar");
2017-08-01 15:54:21 +00:00
| ^^^^^^^^^
|
= help: consider using consider using `str::starts_with`
error: trivial regex
--> $DIR/regex.rs:59:40
2017-08-01 15:54:21 +00:00
|
59 | let trivial_ends_with = Regex::new("foobar$");
2017-08-01 15:54:21 +00:00
| ^^^^^^^^^
|
= help: consider using consider using `str::ends_with`
error: trivial regex
--> $DIR/regex.rs:61:39
2017-08-01 15:54:21 +00:00
|
61 | let trivial_contains = Regex::new("foobar");
2017-08-01 15:54:21 +00:00
| ^^^^^^^^
|
= help: consider using consider using `str::contains`
error: trivial regex
--> $DIR/regex.rs:63:39
2017-08-01 15:54:21 +00:00
|
63 | let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
2017-08-01 15:54:21 +00:00
| ^^^^^^^^^^^^^^^^
|
= help: consider using consider using `str::contains`
error: trivial regex
--> $DIR/regex.rs:65:40
2017-08-01 15:54:21 +00:00
|
65 | let trivial_backslash = Regex::new("a/.b");
2017-08-01 15:54:21 +00:00
| ^^^^^^^
|
= help: consider using consider using `str::contains`
error: trivial regex
--> $DIR/regex.rs:68:36
2017-08-01 15:54:21 +00:00
|
68 | let trivial_empty = Regex::new("");
2017-08-01 15:54:21 +00:00
| ^^
|
= help: consider using the regex is unlikely to be useful as it is
error: trivial regex
--> $DIR/regex.rs:70:36
2017-08-01 15:54:21 +00:00
|
70 | let trivial_empty = Regex::new("^");
2017-08-01 15:54:21 +00:00
| ^^^
|
= help: consider using the regex is unlikely to be useful as it is
error: trivial regex
--> $DIR/regex.rs:72:36
2017-08-01 15:54:21 +00:00
|
72 | let trivial_empty = Regex::new("^$");
2017-08-01 15:54:21 +00:00
| ^^^^
|
= help: consider using consider using `str::is_empty`
error: trivial regex
--> $DIR/regex.rs:74:44
2017-08-01 15:54:21 +00:00
|
74 | let binary_trivial_empty = BRegex::new("^$");
2017-08-01 15:54:21 +00:00
| ^^^^
|
= help: consider using consider using `str::is_empty`
error: aborting due to 23 previous errors
2018-01-16 16:06:27 +00:00