fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
7.7 KiB239 linesraw
1error: single-character string constant used as pattern
2  --> $DIR/single_char_pattern.rs:7:13
3   |
4LL |     x.split("x");
5   |             ^^^ help: try using a `char` instead: `'x'`
6   |
7   = note: `-D clippy::single-char-pattern` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::single_char_pattern)]`
9
10error: single-character string constant used as pattern
11  --> $DIR/single_char_pattern.rs:13:13
12   |
13LL |     x.split("ß");
14   |             ^^^ help: try using a `char` instead: `'ß'`
15
16error: single-character string constant used as pattern
17  --> $DIR/single_char_pattern.rs:14:13
18   |
19LL |     x.split("ℝ");
20   |             ^^^ help: try using a `char` instead: `'ℝ'`
21
22error: single-character string constant used as pattern
23  --> $DIR/single_char_pattern.rs:15:13
24   |
25LL |     x.split("💣");
26   |             ^^^^ help: try using a `char` instead: `'💣'`
27
28error: single-character string constant used as pattern
29  --> $DIR/single_char_pattern.rs:18:23
30   |
31LL |     x.split_inclusive("x");
32   |                       ^^^ help: try using a `char` instead: `'x'`
33
34error: single-character string constant used as pattern
35  --> $DIR/single_char_pattern.rs:19:16
36   |
37LL |     x.contains("x");
38   |                ^^^ help: try using a `char` instead: `'x'`
39
40error: single-character string constant used as pattern
41  --> $DIR/single_char_pattern.rs:20:19
42   |
43LL |     x.starts_with("x");
44   |                   ^^^ help: try using a `char` instead: `'x'`
45
46error: single-character string constant used as pattern
47  --> $DIR/single_char_pattern.rs:21:17
48   |
49LL |     x.ends_with("x");
50   |                 ^^^ help: try using a `char` instead: `'x'`
51
52error: single-character string constant used as pattern
53  --> $DIR/single_char_pattern.rs:22:12
54   |
55LL |     x.find("x");
56   |            ^^^ help: try using a `char` instead: `'x'`
57
58error: single-character string constant used as pattern
59  --> $DIR/single_char_pattern.rs:23:13
60   |
61LL |     x.rfind("x");
62   |             ^^^ help: try using a `char` instead: `'x'`
63
64error: single-character string constant used as pattern
65  --> $DIR/single_char_pattern.rs:24:14
66   |
67LL |     x.rsplit("x");
68   |              ^^^ help: try using a `char` instead: `'x'`
69
70error: single-character string constant used as pattern
71  --> $DIR/single_char_pattern.rs:25:24
72   |
73LL |     x.split_terminator("x");
74   |                        ^^^ help: try using a `char` instead: `'x'`
75
76error: single-character string constant used as pattern
77  --> $DIR/single_char_pattern.rs:26:25
78   |
79LL |     x.rsplit_terminator("x");
80   |                         ^^^ help: try using a `char` instead: `'x'`
81
82error: single-character string constant used as pattern
83  --> $DIR/single_char_pattern.rs:27:17
84   |
85LL |     x.splitn(2, "x");
86   |                 ^^^ help: try using a `char` instead: `'x'`
87
88error: single-character string constant used as pattern
89  --> $DIR/single_char_pattern.rs:28:18
90   |
91LL |     x.rsplitn(2, "x");
92   |                  ^^^ help: try using a `char` instead: `'x'`
93
94error: single-character string constant used as pattern
95  --> $DIR/single_char_pattern.rs:29:18
96   |
97LL |     x.split_once("x");
98   |                  ^^^ help: try using a `char` instead: `'x'`
99
100error: single-character string constant used as pattern
101  --> $DIR/single_char_pattern.rs:30:19
102   |
103LL |     x.rsplit_once("x");
104   |                   ^^^ help: try using a `char` instead: `'x'`
105
106error: single-character string constant used as pattern
107  --> $DIR/single_char_pattern.rs:31:15
108   |
109LL |     x.matches("x");
110   |               ^^^ help: try using a `char` instead: `'x'`
111
112error: single-character string constant used as pattern
113  --> $DIR/single_char_pattern.rs:32:16
114   |
115LL |     x.rmatches("x");
116   |                ^^^ help: try using a `char` instead: `'x'`
117
118error: single-character string constant used as pattern
119  --> $DIR/single_char_pattern.rs:33:21
120   |
121LL |     x.match_indices("x");
122   |                     ^^^ help: try using a `char` instead: `'x'`
123
124error: single-character string constant used as pattern
125  --> $DIR/single_char_pattern.rs:34:22
126   |
127LL |     x.rmatch_indices("x");
128   |                      ^^^ help: try using a `char` instead: `'x'`
129
130error: single-character string constant used as pattern
131  --> $DIR/single_char_pattern.rs:35:26
132   |
133LL |     x.trim_start_matches("x");
134   |                          ^^^ help: try using a `char` instead: `'x'`
135
136error: single-character string constant used as pattern
137  --> $DIR/single_char_pattern.rs:36:24
138   |
139LL |     x.trim_end_matches("x");
140   |                        ^^^ help: try using a `char` instead: `'x'`
141
142error: single-character string constant used as pattern
143  --> $DIR/single_char_pattern.rs:37:20
144   |
145LL |     x.strip_prefix("x");
146   |                    ^^^ help: try using a `char` instead: `'x'`
147
148error: single-character string constant used as pattern
149  --> $DIR/single_char_pattern.rs:38:20
150   |
151LL |     x.strip_suffix("x");
152   |                    ^^^ help: try using a `char` instead: `'x'`
153
154error: single-character string constant used as pattern
155  --> $DIR/single_char_pattern.rs:39:15
156   |
157LL |     x.replace("x", "y");
158   |               ^^^ help: try using a `char` instead: `'x'`
159
160error: single-character string constant used as pattern
161  --> $DIR/single_char_pattern.rs:40:16
162   |
163LL |     x.replacen("x", "y", 3);
164   |                ^^^ help: try using a `char` instead: `'x'`
165
166error: single-character string constant used as pattern
167  --> $DIR/single_char_pattern.rs:42:13
168   |
169LL |     x.split("\n");
170   |             ^^^^ help: try using a `char` instead: `'\n'`
171
172error: single-character string constant used as pattern
173  --> $DIR/single_char_pattern.rs:43:13
174   |
175LL |     x.split("'");
176   |             ^^^ help: try using a `char` instead: `'\''`
177
178error: single-character string constant used as pattern
179  --> $DIR/single_char_pattern.rs:44:13
180   |
181LL |     x.split("\'");
182   |             ^^^^ help: try using a `char` instead: `'\''`
183
184error: single-character string constant used as pattern
185  --> $DIR/single_char_pattern.rs:49:31
186   |
187LL |     x.replace(';', ",").split(","); // issue #2978
188   |                               ^^^ help: try using a `char` instead: `','`
189
190error: single-character string constant used as pattern
191  --> $DIR/single_char_pattern.rs:50:19
192   |
193LL |     x.starts_with("\x03"); // issue #2996
194   |                   ^^^^^^ help: try using a `char` instead: `'\x03'`
195
196error: single-character string constant used as pattern
197  --> $DIR/single_char_pattern.rs:57:13
198   |
199LL |     x.split(r"a");
200   |             ^^^^ help: try using a `char` instead: `'a'`
201
202error: single-character string constant used as pattern
203  --> $DIR/single_char_pattern.rs:58:13
204   |
205LL |     x.split(r#"a"#);
206   |             ^^^^^^ help: try using a `char` instead: `'a'`
207
208error: single-character string constant used as pattern
209  --> $DIR/single_char_pattern.rs:59:13
210   |
211LL |     x.split(r###"a"###);
212   |             ^^^^^^^^^^ help: try using a `char` instead: `'a'`
213
214error: single-character string constant used as pattern
215  --> $DIR/single_char_pattern.rs:60:13
216   |
217LL |     x.split(r###"'"###);
218   |             ^^^^^^^^^^ help: try using a `char` instead: `'\''`
219
220error: single-character string constant used as pattern
221  --> $DIR/single_char_pattern.rs:61:13
222   |
223LL |     x.split(r###"#"###);
224   |             ^^^^^^^^^^ help: try using a `char` instead: `'#'`
225
226error: single-character string constant used as pattern
227  --> $DIR/single_char_pattern.rs:63:13
228   |
229LL |     x.split(r#"\"#);
230   |             ^^^^^^ help: try using a `char` instead: `'\\'`
231
232error: single-character string constant used as pattern
233  --> $DIR/single_char_pattern.rs:64:13
234   |
235LL |     x.split(r"\");
236   |             ^^^^ help: try using a `char` instead: `'\\'`
237
238error: aborting due to 39 previous errors
239