2017-10-09 23:00:47 -05:00
|
|
|
|
error: single-character string constant used as pattern
|
2019-01-31 01:27:04 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:9:13
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.split("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
|
|
|
|
|
= 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
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:15:13
|
|
|
|
|
|
|
|
|
|
|
LL | x.split("ß");
|
|
|
|
|
| ^^^ help: try using a `char` instead: `'ß'`
|
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
|
|
|
|
--> $DIR/single_char_pattern.rs:16:13
|
|
|
|
|
|
|
|
|
|
|
LL | x.split("ℝ");
|
|
|
|
|
| ^^^ help: try using a `char` instead: `'ℝ'`
|
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
|
|
|
|
--> $DIR/single_char_pattern.rs:17:13
|
|
|
|
|
|
|
|
|
|
|
LL | x.split("💣");
|
|
|
|
|
| ^^^^ help: try using a `char` instead: `'💣'`
|
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
|
|
|
|
--> $DIR/single_char_pattern.rs:20:16
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.contains("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:21:19
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.starts_with("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:22:17
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.ends_with("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:23:12
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.find("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:24:13
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rfind("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:25:14
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rsplit("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:26:24
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.split_terminator("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:27:25
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rsplit_terminator("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:28:17
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.splitn(0, "x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:29:18
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rsplitn(0, "x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:30:15
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.matches("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:31:16
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rmatches("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:32:21
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.match_indices("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:33:22
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.rmatch_indices("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:34:26
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.trim_start_matches("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2020-11-05 07:29:48 -06:00
|
|
|
|
--> $DIR/single_char_pattern.rs:35:24
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.trim_end_matches("x");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
2017-10-09 23:00:47 -05:00
|
|
|
|
|
2018-03-02 09:00:01 -06:00
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:36:20
|
|
|
|
|
|
|
|
|
|
|
LL | x.strip_prefix("x");
|
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
|
|
|
|
--> $DIR/single_char_pattern.rs:37:20
|
|
|
|
|
|
|
|
|
|
|
LL | x.strip_suffix("x");
|
|
|
|
|
| ^^^ help: try using a `char` instead: `'x'`
|
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
|
|
|
|
--> $DIR/single_char_pattern.rs:39:13
|
2018-03-02 09:00:01 -06:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.split("/n");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^ help: try using a `char` instead: `'/n'`
|
2018-03-02 09:00:01 -06:00
|
|
|
|
|
2018-07-31 05:20:32 -05:00
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:40:13
|
2019-04-08 07:55:50 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split("'");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `'/''`
|
2019-04-08 07:55:50 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:41:13
|
2019-04-08 07:55:50 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split("/'");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^ help: try using a `char` instead: `'/''`
|
2019-04-08 07:55:50 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:46:31
|
2018-07-31 05:20:32 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.replace(";", ",").split(","); // issue #2978
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^ help: try using a `char` instead: `','`
|
2018-07-31 05:20:32 -05:00
|
|
|
|
|
2018-08-03 03:19:29 -05:00
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:47:19
|
2018-08-03 03:19:29 -05:00
|
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
|
LL | x.starts_with("/x03"); // issue #2996
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^^^ help: try using a `char` instead: `'/x03'`
|
2018-08-03 03:19:29 -05:00
|
|
|
|
|
2019-08-08 22:45:49 -05:00
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:54:13
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split(r"a");
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^ help: try using a `char` instead: `'a'`
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:55:13
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split(r#"a"#);
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^^^ help: try using a `char` instead: `'a'`
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
2019-08-08 22:45:49 -05:00
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:56:13
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split(r###"a"###);
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^^^^^^^ help: try using a `char` instead: `'a'`
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:57:13
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split(r###"'"###);
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^^^^^^^ help: try using a `char` instead: `'/''`
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
error: single-character string constant used as pattern
|
2021-05-06 04:51:22 -05:00
|
|
|
|
--> $DIR/single_char_pattern.rs:58:13
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
|
|
|
|
|
LL | x.split(r###"#"###);
|
2020-01-06 00:36:33 -06:00
|
|
|
|
| ^^^^^^^^^^ help: try using a `char` instead: `'#'`
|
2019-08-08 22:45:49 -05:00
|
|
|
|
|
2021-05-06 04:51:22 -05:00
|
|
|
|
error: aborting due to 32 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|
|