]> git.lizzy.rs Git - rust.git/blob - tests/ui/regex.stderr
Merge pull request #2984 from flip1995/single_char_pattern
[rust.git] / tests / ui / regex.stderr
1 error: trivial regex
2   --> $DIR/regex.rs:16:45
3    |
4 16 |     let pipe_in_wrong_position = Regex::new("|");
5    |                                             ^^^
6    |
7    = note: `-D trivial-regex` implied by `-D warnings`
8    = help: the regex is unlikely to be useful as it is
9
10 error: trivial regex
11   --> $DIR/regex.rs:17:60
12    |
13 17 |     let pipe_in_wrong_position_builder = RegexBuilder::new("|");
14    |                                                            ^^^
15    |
16    = help: the regex is unlikely to be useful as it is
17
18 error: regex syntax error: invalid character class range, the start must be <= the end
19   --> $DIR/regex.rs:18:42
20    |
21 18 |     let wrong_char_ranice = Regex::new("[z-a]");
22    |                                          ^^^
23    |
24    = note: `-D invalid-regex` implied by `-D warnings`
25
26 error: regex syntax error: invalid character class range, the start must be <= the end
27   --> $DIR/regex.rs:19:37
28    |
29 19 |     let some_unicode = Regex::new("[é-è]");
30    |                                     ^^^
31
32 error: regex syntax error on position 0: unclosed group
33   --> $DIR/regex.rs:21:33
34    |
35 21 |     let some_regex = Regex::new(OPENING_PAREN);
36    |                                 ^^^^^^^^^^^^^
37
38 error: trivial regex
39   --> $DIR/regex.rs:23:53
40    |
41 23 |     let binary_pipe_in_wrong_position = BRegex::new("|");
42    |                                                     ^^^
43    |
44    = help: the regex is unlikely to be useful as it is
45
46 error: regex syntax error on position 0: unclosed group
47   --> $DIR/regex.rs:24:41
48    |
49 24 |     let some_binary_regex = BRegex::new(OPENING_PAREN);
50    |                                         ^^^^^^^^^^^^^
51
52 error: regex syntax error on position 0: unclosed group
53   --> $DIR/regex.rs:25:56
54    |
55 25 |     let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
56    |                                                        ^^^^^^^^^^^^^
57
58 error: regex syntax error on position 0: unclosed group
59   --> $DIR/regex.rs:41:9
60    |
61 41 |         OPENING_PAREN,
62    |         ^^^^^^^^^^^^^
63
64 error: regex syntax error on position 0: unclosed group
65   --> $DIR/regex.rs:45:9
66    |
67 45 |         OPENING_PAREN,
68    |         ^^^^^^^^^^^^^
69
70 error: regex syntax error: unrecognized escape sequence
71   --> $DIR/regex.rs:49:45
72    |
73 49 |     let raw_string_error = Regex::new(r"[...//...]");
74    |                                             ^^
75
76 error: regex syntax error: unrecognized escape sequence
77   --> $DIR/regex.rs:50:46
78    |
79 50 |     let raw_string_error = Regex::new(r#"[...//...]"#);
80    |                                              ^^
81
82 error: trivial regex
83   --> $DIR/regex.rs:54:33
84    |
85 54 |     let trivial_eq = Regex::new("^foobar$");
86    |                                 ^^^^^^^^^^
87    |
88    = help: consider using `==` on `str`s
89
90 error: trivial regex
91   --> $DIR/regex.rs:56:48
92    |
93 56 |     let trivial_eq_builder = RegexBuilder::new("^foobar$");
94    |                                                ^^^^^^^^^^
95    |
96    = help: consider using `==` on `str`s
97
98 error: trivial regex
99   --> $DIR/regex.rs:58:42
100    |
101 58 |     let trivial_starts_with = Regex::new("^foobar");
102    |                                          ^^^^^^^^^
103    |
104    = help: consider using `str::starts_with`
105
106 error: trivial regex
107   --> $DIR/regex.rs:60:40
108    |
109 60 |     let trivial_ends_with = Regex::new("foobar$");
110    |                                        ^^^^^^^^^
111    |
112    = help: consider using `str::ends_with`
113
114 error: trivial regex
115   --> $DIR/regex.rs:62:39
116    |
117 62 |     let trivial_contains = Regex::new("foobar");
118    |                                       ^^^^^^^^
119    |
120    = help: consider using `str::contains`
121
122 error: trivial regex
123   --> $DIR/regex.rs:64:39
124    |
125 64 |     let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
126    |                                       ^^^^^^^^^^^^^^^^
127    |
128    = help: consider using `str::contains`
129
130 error: trivial regex
131   --> $DIR/regex.rs:66:40
132    |
133 66 |     let trivial_backslash = Regex::new("a/.b");
134    |                                        ^^^^^^^
135    |
136    = help: consider using `str::contains`
137
138 error: trivial regex
139   --> $DIR/regex.rs:69:36
140    |
141 69 |     let trivial_empty = Regex::new("");
142    |                                    ^^
143    |
144    = help: the regex is unlikely to be useful as it is
145
146 error: trivial regex
147   --> $DIR/regex.rs:71:36
148    |
149 71 |     let trivial_empty = Regex::new("^");
150    |                                    ^^^
151    |
152    = help: the regex is unlikely to be useful as it is
153
154 error: trivial regex
155   --> $DIR/regex.rs:73:36
156    |
157 73 |     let trivial_empty = Regex::new("^$");
158    |                                    ^^^^
159    |
160    = help: consider using `str::is_empty`
161
162 error: trivial regex
163   --> $DIR/regex.rs:75:44
164    |
165 75 |     let binary_trivial_empty = BRegex::new("^$");
166    |                                            ^^^^
167    |
168    = help: consider using `str::is_empty`
169
170 error: aborting due to 23 previous errors
171