@@ -2,111 +2,117 @@ error: single-character string constant used as pattern
2
2
--> $DIR/single_char_pattern.rs:5:13
3
3
|
4
4
5 | x.split("x");
5
- | -------- ^^^- help: try using a char instead: `x.split( 'x') `
5
+ | ^^^ help: try using a char instead: `'x'`
6
6
|
7
7
= note: `-D single-char-pattern` implied by `-D warnings`
8
8
9
9
error: single-character string constant used as pattern
10
10
--> $DIR/single_char_pattern.rs:22:16
11
11
|
12
12
22 | x.contains("x");
13
- | ----------- ^^^- help: try using a char instead: `x.contains( 'x') `
13
+ | ^^^ help: try using a char instead: `'x'`
14
14
15
15
error: single-character string constant used as pattern
16
16
--> $DIR/single_char_pattern.rs:23:19
17
17
|
18
18
23 | x.starts_with("x");
19
- | -------------- ^^^- help: try using a char instead: `x.starts_with( 'x') `
19
+ | ^^^ help: try using a char instead: `'x'`
20
20
21
21
error: single-character string constant used as pattern
22
22
--> $DIR/single_char_pattern.rs:24:17
23
23
|
24
24
24 | x.ends_with("x");
25
- | ------------ ^^^- help: try using a char instead: `x.ends_with( 'x') `
25
+ | ^^^ help: try using a char instead: `'x'`
26
26
27
27
error: single-character string constant used as pattern
28
28
--> $DIR/single_char_pattern.rs:25:12
29
29
|
30
30
25 | x.find("x");
31
- | ------- ^^^- help: try using a char instead: `x.find( 'x') `
31
+ | ^^^ help: try using a char instead: `'x'`
32
32
33
33
error: single-character string constant used as pattern
34
34
--> $DIR/single_char_pattern.rs:26:13
35
35
|
36
36
26 | x.rfind("x");
37
- | -------- ^^^- help: try using a char instead: `x.rfind( 'x') `
37
+ | ^^^ help: try using a char instead: `'x'`
38
38
39
39
error: single-character string constant used as pattern
40
40
--> $DIR/single_char_pattern.rs:27:14
41
41
|
42
42
27 | x.rsplit("x");
43
- | --------- ^^^- help: try using a char instead: `x.rsplit( 'x') `
43
+ | ^^^ help: try using a char instead: `'x'`
44
44
45
45
error: single-character string constant used as pattern
46
46
--> $DIR/single_char_pattern.rs:28:24
47
47
|
48
48
28 | x.split_terminator("x");
49
- | ------------------- ^^^- help: try using a char instead: `x.split_terminator( 'x') `
49
+ | ^^^ help: try using a char instead: `'x'`
50
50
51
51
error: single-character string constant used as pattern
52
52
--> $DIR/single_char_pattern.rs:29:25
53
53
|
54
54
29 | x.rsplit_terminator("x");
55
- | -------------------- ^^^- help: try using a char instead: `x.rsplit_terminator( 'x') `
55
+ | ^^^ help: try using a char instead: `'x'`
56
56
57
57
error: single-character string constant used as pattern
58
58
--> $DIR/single_char_pattern.rs:30:17
59
59
|
60
60
30 | x.splitn(0, "x");
61
- | ------------ ^^^- help: try using a char instead: `x.splitn(0, 'x') `
61
+ | ^^^ help: try using a char instead: `'x'`
62
62
63
63
error: single-character string constant used as pattern
64
64
--> $DIR/single_char_pattern.rs:31:18
65
65
|
66
66
31 | x.rsplitn(0, "x");
67
- | ------------- ^^^- help: try using a char instead: `x.rsplitn(0, 'x') `
67
+ | ^^^ help: try using a char instead: `'x'`
68
68
69
69
error: single-character string constant used as pattern
70
70
--> $DIR/single_char_pattern.rs:32:15
71
71
|
72
72
32 | x.matches("x");
73
- | ---------- ^^^- help: try using a char instead: `x.matches( 'x') `
73
+ | ^^^ help: try using a char instead: `'x'`
74
74
75
75
error: single-character string constant used as pattern
76
76
--> $DIR/single_char_pattern.rs:33:16
77
77
|
78
78
33 | x.rmatches("x");
79
- | ----------- ^^^- help: try using a char instead: `x.rmatches( 'x') `
79
+ | ^^^ help: try using a char instead: `'x'`
80
80
81
81
error: single-character string constant used as pattern
82
82
--> $DIR/single_char_pattern.rs:34:21
83
83
|
84
84
34 | x.match_indices("x");
85
- | ---------------- ^^^- help: try using a char instead: `x.match_indices( 'x') `
85
+ | ^^^ help: try using a char instead: `'x'`
86
86
87
87
error: single-character string constant used as pattern
88
88
--> $DIR/single_char_pattern.rs:35:22
89
89
|
90
90
35 | x.rmatch_indices("x");
91
- | ----------------- ^^^- help: try using a char instead: `x.rmatch_indices( 'x') `
91
+ | ^^^ help: try using a char instead: `'x'`
92
92
93
93
error: single-character string constant used as pattern
94
94
--> $DIR/single_char_pattern.rs:36:25
95
95
|
96
96
36 | x.trim_left_matches("x");
97
- | -------------------- ^^^- help: try using a char instead: `x.trim_left_matches( 'x') `
97
+ | ^^^ help: try using a char instead: `'x'`
98
98
99
99
error: single-character string constant used as pattern
100
100
--> $DIR/single_char_pattern.rs:37:26
101
101
|
102
102
37 | x.trim_right_matches("x");
103
- | --------------------- ^^^- help: try using a char instead: `x.trim_right_matches( 'x') `
103
+ | ^^^ help: try using a char instead: `'x'`
104
104
105
105
error: single-character string constant used as pattern
106
106
--> $DIR/single_char_pattern.rs:39:13
107
107
|
108
108
39 | x.split("/n");
109
- | -------- ^^^^- help: try using a char instead: `x.split( '/n') `
109
+ | ^^^^ help: try using a char instead: `'/n'`
110
110
111
- error: aborting due to 18 previous errors
111
+ error: single-character string constant used as pattern
112
+ --> $DIR/single_char_pattern.rs:44:31
113
+ |
114
+ 44 | x.replace(";", ",").split(","); // issue #2978
115
+ | ^^^ help: try using a char instead: `','`
116
+
117
+ error: aborting due to 19 previous errors
112
118
0 commit comments