rust/tests/ui/single_char_pattern.stderr

125 lines
4.0 KiB
Plaintext
Raw Normal View History

2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:17:13
|
17 | x.split("x");
| ^^^ help: try using a char instead: `'x'`
|
= note: `-D clippy::single-char-pattern` implied by `-D warnings`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:34:16
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
34 | x.contains("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:35:19
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
35 | x.starts_with("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:36:17
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
36 | x.ends_with("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:37:12
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
37 | x.find("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:38:13
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
38 | x.rfind("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:39:14
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
39 | x.rsplit("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:40:24
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
40 | x.split_terminator("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:41:25
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
41 | x.rsplit_terminator("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:42:17
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
42 | x.splitn(0, "x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:43:18
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
43 | x.rsplitn(0, "x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:44:15
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
44 | x.matches("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:45:16
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
45 | x.rmatches("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:46:21
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
46 | x.match_indices("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:47:22
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
47 | x.rmatch_indices("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:48:25
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
48 | x.trim_left_matches("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:49:26
2017-10-09 23:00:47 -05:00
|
2018-10-06 11:18:06 -05:00
49 | x.trim_right_matches("x");
| ^^^ help: try using a char instead: `'x'`
2017-10-09 23:00:47 -05:00
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:51:13
|
2018-10-06 11:18:06 -05:00
51 | x.split("/n");
| ^^^^ help: try using a char instead: `'/n'`
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:56:31
|
2018-10-06 11:18:06 -05:00
56 | x.replace(";", ",").split(","); // issue #2978
| ^^^ help: try using a char instead: `','`
error: single-character string constant used as pattern
2018-10-06 11:18:06 -05:00
--> $DIR/single_char_pattern.rs:57:19
|
2018-10-06 11:18:06 -05:00
57 | x.starts_with("/x03"); // issue #2996
| ^^^^^^ help: try using a char instead: `'/x03'`
error: aborting due to 20 previous errors
2018-01-16 10:06:27 -06:00