summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/regex.stderr
blob: 2424644c6f6b14ea478439d6869d2b54c34820c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
error: trivial regex
  --> $DIR/regex.rs:13:45
   |
LL |     let pipe_in_wrong_position = Regex::new("|");
   |                                             ^^^
   |
   = help: the regex is unlikely to be useful as it is
   = note: `-D clippy::trivial-regex` implied by `-D warnings`

error: trivial regex
  --> $DIR/regex.rs:14:60
   |
LL |     let pipe_in_wrong_position_builder = RegexBuilder::new("|");
   |                                                            ^^^
   |
   = help: the regex is unlikely to be useful as it is

error: regex syntax error: invalid character class range, the start must be <= the end
  --> $DIR/regex.rs:15:42
   |
LL |     let wrong_char_ranice = Regex::new("[z-a]");
   |                                          ^^^
   |
   = note: `-D clippy::invalid-regex` implied by `-D warnings`

error: regex syntax error: invalid character class range, the start must be <= the end
  --> $DIR/regex.rs:16:37
   |
LL |     let some_unicode = Regex::new("[é-è]");
   |                                     ^^^

error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:18:33
   |
LL |     let some_regex = Regex::new(OPENING_PAREN);
   |                                 ^^^^^^^^^^^^^

error: trivial regex
  --> $DIR/regex.rs:20:53
   |
LL |     let binary_pipe_in_wrong_position = BRegex::new("|");
   |                                                     ^^^
   |
   = help: the regex is unlikely to be useful as it is

error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:21:41
   |
LL |     let some_binary_regex = BRegex::new(OPENING_PAREN);
   |                                         ^^^^^^^^^^^^^

error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:22:56
   |
LL |     let some_binary_regex_builder = BRegexBuilder::new(OPENING_PAREN);
   |                                                        ^^^^^^^^^^^^^

error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:34:37
   |
LL |     let set_error = RegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]);
   |                                     ^^^^^^^^^^^^^

error: regex syntax error on position 0: unclosed group
  --> $DIR/regex.rs:35:39
   |
LL |     let bset_error = BRegexSet::new(&[OPENING_PAREN, r"[a-z]+/.(com|org|net)"]);
   |                                       ^^^^^^^^^^^^^

error: regex syntax error: unrecognized escape sequence
  --> $DIR/regex.rs:37:45
   |
LL |     let raw_string_error = Regex::new(r"[...//...]");
   |                                             ^^

error: regex syntax error: unrecognized escape sequence
  --> $DIR/regex.rs:38:46
   |
LL |     let raw_string_error = Regex::new(r#"[...//...]"#);
   |                                              ^^

error: trivial regex
  --> $DIR/regex.rs:42:33
   |
LL |     let trivial_eq = Regex::new("^foobar$");
   |                                 ^^^^^^^^^^
   |
   = help: consider using `==` on `str`s

error: trivial regex
  --> $DIR/regex.rs:44:48
   |
LL |     let trivial_eq_builder = RegexBuilder::new("^foobar$");
   |                                                ^^^^^^^^^^
   |
   = help: consider using `==` on `str`s

error: trivial regex
  --> $DIR/regex.rs:46:42
   |
LL |     let trivial_starts_with = Regex::new("^foobar");
   |                                          ^^^^^^^^^
   |
   = help: consider using `str::starts_with`

error: trivial regex
  --> $DIR/regex.rs:48:40
   |
LL |     let trivial_ends_with = Regex::new("foobar$");
   |                                        ^^^^^^^^^
   |
   = help: consider using `str::ends_with`

error: trivial regex
  --> $DIR/regex.rs:50:39
   |
LL |     let trivial_contains = Regex::new("foobar");
   |                                       ^^^^^^^^
   |
   = help: consider using `str::contains`

error: trivial regex
  --> $DIR/regex.rs:52:39
   |
LL |     let trivial_contains = Regex::new(NOT_A_REAL_REGEX);
   |                                       ^^^^^^^^^^^^^^^^
   |
   = help: consider using `str::contains`

error: trivial regex
  --> $DIR/regex.rs:54:40
   |
LL |     let trivial_backslash = Regex::new("a/.b");
   |                                        ^^^^^^^
   |
   = help: consider using `str::contains`

error: trivial regex
  --> $DIR/regex.rs:57:36
   |
LL |     let trivial_empty = Regex::new("");
   |                                    ^^
   |
   = help: the regex is unlikely to be useful as it is

error: trivial regex
  --> $DIR/regex.rs:59:36
   |
LL |     let trivial_empty = Regex::new("^");
   |                                    ^^^
   |
   = help: the regex is unlikely to be useful as it is

error: trivial regex
  --> $DIR/regex.rs:61:36
   |
LL |     let trivial_empty = Regex::new("^$");
   |                                    ^^^^
   |
   = help: consider using `str::is_empty`

error: trivial regex
  --> $DIR/regex.rs:63:44
   |
LL |     let binary_trivial_empty = BRegex::new("^$");
   |                                            ^^^^
   |
   = help: consider using `str::is_empty`

error: aborting due to 23 previous errors