1
1
error: trivial regex
2
- --> tests/ui/regex.rs:19 :45
2
+ --> tests/ui/regex.rs:20 :45
3
3
|
4
4
LL | let pipe_in_wrong_position = Regex::new("|");
5
5
| ^^^
@@ -9,15 +9,15 @@ LL | let pipe_in_wrong_position = Regex::new("|");
9
9
= help: to override `-D warnings` add `#[allow(clippy::trivial_regex)]`
10
10
11
11
error: trivial regex
12
- --> tests/ui/regex.rs:21 :60
12
+ --> tests/ui/regex.rs:22 :60
13
13
|
14
14
LL | let pipe_in_wrong_position_builder = RegexBuilder::new("|");
15
15
| ^^^
16
16
|
17
17
= help: the regex is unlikely to be useful as it is
18
18
19
19
error: regex syntax error: invalid character class range, the start must be <= the end
20
- --> tests/ui/regex.rs:23 :42
20
+ --> tests/ui/regex.rs:24 :42
21
21
|
22
22
LL | let wrong_char_ranice = Regex::new("[z-a]");
23
23
| ^^^
@@ -26,7 +26,7 @@ LL | let wrong_char_ranice = Regex::new("[z-a]");
26
26
= help: to override `-D warnings` add `#[allow(clippy::invalid_regex)]`
27
27
28
28
error: regex syntax error: invalid character class range, the start must be <= the end
29
- --> tests/ui/regex.rs:26 :37
29
+ --> tests/ui/regex.rs:27 :37
30
30
|
31
31
LL | let some_unicode = Regex::new("[é-è]");
32
32
| ^^^
@@ -35,13 +35,13 @@ error: regex parse error:
35
35
(
36
36
^
37
37
error: unclosed group
38
- --> tests/ui/regex.rs:29 :33
38
+ --> tests/ui/regex.rs:30 :33
39
39
|
40
40
LL | let some_regex = Regex::new(OPENING_PAREN);
41
41
| ^^^^^^^^^^^^^
42
42
43
43
error: trivial regex
44
- --> tests/ui/regex.rs:31 :53
44
+ --> tests/ui/regex.rs:32 :53
45
45
|
46
46
LL | let binary_pipe_in_wrong_position = BRegex::new("|");
47
47
| ^^^
@@ -52,7 +52,7 @@ error: regex parse error:
52
52
(
53
53
^
54
54
error: unclosed group
55
- --> tests/ui/regex.rs:33 :41
55
+ --> tests/ui/regex.rs:34 :41
56
56
|
57
57
LL | let some_binary_regex = BRegex::new(OPENING_PAREN);
58
58
| ^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ error: regex parse error:
61
61
(
62
62
^
63
63
error: unclosed group
64
- --> tests/ui/regex.rs:34 :56
64
+ --> tests/ui/regex.rs:35 :56
65
65
|
66
66
LL | let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
67
67
| ^^^^^^^^^^^^^
@@ -70,7 +70,7 @@ error: regex parse error:
70
70
(
71
71
^
72
72
error: unclosed group
73
- --> tests/ui/regex.rs:46 :37
73
+ --> tests/ui/regex.rs:47 :37
74
74
|
75
75
LL | let set_error = RegexSet::new(&[OPENING_PAREN, r"[a-z]+\.(com|org|net)"]);
76
76
| ^^^^^^^^^^^^^
@@ -79,7 +79,7 @@ error: regex parse error:
79
79
(
80
80
^
81
81
error: unclosed group
82
- --> tests/ui/regex.rs:47 :39
82
+ --> tests/ui/regex.rs:48 :39
83
83
|
84
84
LL | let bset_error = BRegexSet::new(&[OPENING_PAREN, r"[a-z]+\.(com|org|net)"]);
85
85
| ^^^^^^^^^^^^^
@@ -88,107 +88,107 @@ error: regex parse error:
88
88
\b\c
89
89
^^
90
90
error: unrecognized escape sequence
91
- --> tests/ui/regex.rs:54 :42
91
+ --> tests/ui/regex.rs:55 :42
92
92
|
93
93
LL | let escaped_string_span = Regex::new("\\b\\c");
94
94
| ^^^^^^^^
95
95
|
96
96
= help: consider using a raw string literal: `r".."`
97
97
98
98
error: regex syntax error: duplicate flag
99
- --> tests/ui/regex.rs:56 :34
99
+ --> tests/ui/regex.rs:57 :34
100
100
|
101
101
LL | let aux_span = Regex::new("(?ixi)");
102
102
| ^ ^
103
103
104
104
error: regex syntax error: pattern can match invalid UTF-8
105
- --> tests/ui/regex.rs:62 :53
105
+ --> tests/ui/regex.rs:63 :53
106
106
|
107
107
LL | let invalid_utf8_should_lint = Regex::new("(?-u).");
108
108
| ^
109
109
110
110
error: trivial regex
111
- --> tests/ui/regex.rs:67 :33
111
+ --> tests/ui/regex.rs:68 :33
112
112
|
113
113
LL | let trivial_eq = Regex::new("^foobar$");
114
114
| ^^^^^^^^^^
115
115
|
116
116
= help: consider using `==` on `str`s
117
117
118
118
error: trivial regex
119
- --> tests/ui/regex.rs:70 :48
119
+ --> tests/ui/regex.rs:71 :48
120
120
|
121
121
LL | let trivial_eq_builder = RegexBuilder::new("^foobar$");
122
122
| ^^^^^^^^^^
123
123
|
124
124
= help: consider using `==` on `str`s
125
125
126
126
error: trivial regex
127
- --> tests/ui/regex.rs:73 :42
127
+ --> tests/ui/regex.rs:74 :42
128
128
|
129
129
LL | let trivial_starts_with = Regex::new("^foobar");
130
130
| ^^^^^^^^^
131
131
|
132
132
= help: consider using `str::starts_with`
133
133
134
134
error: trivial regex
135
- --> tests/ui/regex.rs:76 :40
135
+ --> tests/ui/regex.rs:77 :40
136
136
|
137
137
LL | let trivial_ends_with = Regex::new("foobar$");
138
138
| ^^^^^^^^^
139
139
|
140
140
= help: consider using `str::ends_with`
141
141
142
142
error: trivial regex
143
- --> tests/ui/regex.rs:79 :39
143
+ --> tests/ui/regex.rs:80 :39
144
144
|
145
145
LL | let trivial_contains = Regex::new("foobar");
146
146
| ^^^^^^^^
147
147
|
148
148
= help: consider using `str::contains`
149
149
150
150
error: trivial regex
151
- --> tests/ui/regex.rs:82 :39
151
+ --> tests/ui/regex.rs:83 :39
152
152
|
153
153
LL | let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
154
154
| ^^^^^^^^^^^^^^^^
155
155
|
156
156
= help: consider using `str::contains`
157
157
158
158
error: trivial regex
159
- --> tests/ui/regex.rs:85 :40
159
+ --> tests/ui/regex.rs:86 :40
160
160
|
161
161
LL | let trivial_backslash = Regex::new("a\\.b");
162
162
| ^^^^^^^
163
163
|
164
164
= help: consider using `str::contains`
165
165
166
166
error: trivial regex
167
- --> tests/ui/regex.rs:89 :36
167
+ --> tests/ui/regex.rs:90 :36
168
168
|
169
169
LL | let trivial_empty = Regex::new("");
170
170
| ^^
171
171
|
172
172
= help: the regex is unlikely to be useful as it is
173
173
174
174
error: trivial regex
175
- --> tests/ui/regex.rs:92 :36
175
+ --> tests/ui/regex.rs:93 :36
176
176
|
177
177
LL | let trivial_empty = Regex::new("^");
178
178
| ^^^
179
179
|
180
180
= help: the regex is unlikely to be useful as it is
181
181
182
182
error: trivial regex
183
- --> tests/ui/regex.rs:95 :36
183
+ --> tests/ui/regex.rs:96 :36
184
184
|
185
185
LL | let trivial_empty = Regex::new("^$");
186
186
| ^^^^
187
187
|
188
188
= help: consider using `str::is_empty`
189
189
190
190
error: trivial regex
191
- --> tests/ui/regex.rs:98 :44
191
+ --> tests/ui/regex.rs:99 :44
192
192
|
193
193
LL | let binary_trivial_empty = BRegex::new("^$");
194
194
| ^^^^
0 commit comments