rust/tests/ui/regex.stderr

172 lines
4.8 KiB
Plaintext
Raw Normal View History

2018-03-13 09:02:40 -05:00
error: trivial regex
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:16:45
|
16 | let pipe_in_wrong_position = Regex::new("|");
| ^^^
|
2018-03-13 09:02:40 -05:00
= note: `-D trivial-regex` implied by `-D warnings`
= help: the regex is unlikely to be useful as it is
2017-08-01 10:54:21 -05:00
2018-03-13 09:02:40 -05:00
error: trivial regex
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:17:60
|
17 | let pipe_in_wrong_position_builder = RegexBuilder::new("|");
| ^^^
2018-03-13 09:02:40 -05:00
|
= help: the regex is unlikely to be useful as it is
2017-08-01 10:54:21 -05:00
2018-03-13 09:02:40 -05:00
error: regex syntax error: invalid character class range, the start must be <= the end
--> $DIR/regex.rs:18:42
2017-08-01 10:54:21 -05:00
|
18 | let wrong_char_ranice = Regex::new("[z-a]");
2018-03-13 09:02:40 -05:00
| ^^^
|
= note: `-D invalid-regex` implied by `-D warnings`
2017-08-01 10:54:21 -05:00
2018-03-13 09:02:40 -05:00
error: regex syntax error: invalid character class range, the start must be <= the end
--> $DIR/regex.rs:19:37
2017-08-01 10:54:21 -05:00
|
19 | let some_unicode = Regex::new("[é-è]");
2018-03-13 09:02:40 -05:00
| ^^^
2017-08-01 10:54:21 -05:00
2018-03-13 09:02:40 -05:00
error: regex syntax error on position 0: unclosed group
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:21:33
|
21 | let some_regex = Regex::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
2018-03-13 09:02:40 -05:00
error: trivial regex
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:23:53
|
23 | let binary_pipe_in_wrong_position = BRegex::new("|");
| ^^^
2018-03-13 09:02:40 -05:00
|
= help: the regex is unlikely to be useful as it is
2017-08-01 10:54:21 -05:00
2018-03-13 09:02:40 -05:00
error: regex syntax error on position 0: unclosed group
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:24:41
|
24 | let some_binary_regex = BRegex::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
2018-03-13 09:02:40 -05:00
error: regex syntax error on position 0: unclosed group
2017-08-01 10:54:21 -05:00
--> $DIR/regex.rs:25:56
|
25 | let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
| ^^^^^^^^^^^^^
2018-03-13 09:02:40 -05:00
error: regex syntax error on position 0: unclosed group
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:41:9
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
41 | OPENING_PAREN,
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^^^^^
2018-03-13 09:02:40 -05:00
error: regex syntax error on position 0: unclosed group
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:45:9
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
45 | OPENING_PAREN,
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^^^^^
error: regex syntax error: unrecognized escape sequence
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:49:45
|
2018-04-07 15:18:51 -05:00
49 | let raw_string_error = Regex::new(r"[...//...]");
2018-03-13 09:02:40 -05:00
| ^^
error: regex syntax error: unrecognized escape sequence
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:50:46
|
2018-04-07 15:18:51 -05:00
50 | let raw_string_error = Regex::new(r#"[...//...]"#);
2018-03-13 09:02:40 -05:00
| ^^
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:54:33
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
54 | let trivial_eq = Regex::new("^foobar$");
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `==` on `str`s
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:56:48
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
56 | let trivial_eq_builder = RegexBuilder::new("^foobar$");
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `==` on `str`s
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:58:42
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
58 | let trivial_starts_with = Regex::new("^foobar");
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::starts_with`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:60:40
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
60 | let trivial_ends_with = Regex::new("foobar$");
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::ends_with`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:62:39
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
62 | let trivial_contains = Regex::new("foobar");
2017-08-01 10:54:21 -05:00
| ^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::contains`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:64:39
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
64 | let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
2017-08-01 10:54:21 -05:00
| ^^^^^^^^^^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::contains`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:66:40
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
66 | let trivial_backslash = Regex::new("a/.b");
2017-08-01 10:54:21 -05:00
| ^^^^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::contains`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:69:36
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
69 | let trivial_empty = Regex::new("");
2017-08-01 10:54:21 -05:00
| ^^
|
2018-03-13 09:02:40 -05:00
= help: the regex is unlikely to be useful as it is
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:71:36
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
71 | let trivial_empty = Regex::new("^");
2017-08-01 10:54:21 -05:00
| ^^^
|
2018-03-13 09:02:40 -05:00
= help: the regex is unlikely to be useful as it is
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:73:36
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
73 | let trivial_empty = Regex::new("^$");
2017-08-01 10:54:21 -05:00
| ^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::is_empty`
2017-08-01 10:54:21 -05:00
error: trivial regex
2018-04-07 15:18:51 -05:00
--> $DIR/regex.rs:75:44
2017-08-01 10:54:21 -05:00
|
2018-04-07 15:18:51 -05:00
75 | let binary_trivial_empty = BRegex::new("^$");
2017-08-01 10:54:21 -05:00
| ^^^^
|
2018-03-13 09:02:40 -05:00
= help: consider using `str::is_empty`
2017-08-01 10:54:21 -05:00
error: aborting due to 23 previous errors
2018-01-16 10:06:27 -06:00