]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/regex.stderr
Auto merge of #84620 - Dylan-DPC:rollup-wkv97im, r=Dylan-DPC
[rust.git] / src / tools / clippy / tests / ui / regex.stderr
1 error: trivial regex
2   --> $DIR/regex.rs:13:45
3    |
4 LL |     let pipe_in_wrong_position = Regex::new("|");
5    |                                             ^^^
6    |
7    = note: `-D clippy::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:14:60
12    |
13 LL |     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:15:42
20    |
21 LL |     let wrong_char_ranice = Regex::new("[z-a]");
22    |                                          ^^^
23    |
24    = note: `-D clippy::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:16:37
28    |
29 LL |     let some_unicode = Regex::new("[é-è]");
30    |                                     ^^^
31
32 error: regex syntax error on position 0: unclosed group
33   --> $DIR/regex.rs:18:33
34    |
35 LL |     let some_regex = Regex::new(OPENING_PAREN);
36    |                                 ^^^^^^^^^^^^^
37
38 error: trivial regex
39   --> $DIR/regex.rs:20:53
40    |
41 LL |     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:21:41
48    |
49 LL |     let some_binary_regex = BRegex::new(OPENING_PAREN);
50    |                                         ^^^^^^^^^^^^^
51
52 error: regex syntax error on position 0: unclosed group
53   --> $DIR/regex.rs:22:56
54    |
55 LL |     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:34:37
60    |
61 LL |     let set_error = RegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]);
62    |                                     ^^^^^^^^^^^^^
63
64 error: regex syntax error on position 0: unclosed group
65   --> $DIR/regex.rs:35:39
66    |
67 LL |     let bset_error = BRegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]);
68    |                                       ^^^^^^^^^^^^^
69
70 error: regex syntax error: unrecognized escape sequence
71   --> $DIR/regex.rs:37:45
72    |
73 LL |     let raw_string_error = Regex::new(r"[...//...]");
74    |                                             ^^
75
76 error: regex syntax error: unrecognized escape sequence
77   --> $DIR/regex.rs:38:46
78    |
79 LL |     let raw_string_error = Regex::new(r#"[...//...]"#);
80    |                                              ^^
81
82 error: trivial regex
83   --> $DIR/regex.rs:42:33
84    |
85 LL |     let trivial_eq = Regex::new("^foobar$");
86    |                                 ^^^^^^^^^^
87    |
88    = help: consider using `==` on `str`s
89
90 error: trivial regex
91   --> $DIR/regex.rs:44:48
92    |
93 LL |     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:46:42
100    |
101 LL |     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:48:40
108    |
109 LL |     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:50:39
116    |
117 LL |     let trivial_contains = Regex::new("foobar");
118    |                                       ^^^^^^^^
119    |
120    = help: consider using `str::contains`
121
122 error: trivial regex
123   --> $DIR/regex.rs:52:39
124    |
125 LL |     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:54:40
132    |
133 LL |     let trivial_backslash = Regex::new("a/.b");
134    |                                        ^^^^^^^
135    |
136    = help: consider using `str::contains`
137
138 error: trivial regex
139   --> $DIR/regex.rs:57:36
140    |
141 LL |     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:59:36
148    |
149 LL |     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:61:36
156    |
157 LL |     let trivial_empty = Regex::new("^$");
158    |                                    ^^^^
159    |
160    = help: consider using `str::is_empty`
161
162 error: trivial regex
163   --> $DIR/regex.rs:63:44
164    |
165 LL |     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