rust/tests/ui/single_char_pattern.stderr

125 lines
4 KiB
Text
Raw Normal View History

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