1 error: `splitn` called with `0` splits
2 --> $DIR/suspicious_splitn.rs:9:13
4 LL | let _ = "a,b".splitn(0, ',');
7 = note: `-D clippy::suspicious-splitn` implied by `-D warnings`
8 = note: the resulting iterator will always return `None`
10 error: `rsplitn` called with `0` splits
11 --> $DIR/suspicious_splitn.rs:10:13
13 LL | let _ = "a,b".rsplitn(0, ',');
14 | ^^^^^^^^^^^^^^^^^^^^^
16 = note: the resulting iterator will always return `None`
18 error: `splitn` called with `1` split
19 --> $DIR/suspicious_splitn.rs:11:13
21 LL | let _ = "a,b".splitn(1, ',');
22 | ^^^^^^^^^^^^^^^^^^^^
24 = note: the resulting iterator will always return the entire string followed by `None`
26 error: `splitn` called with `0` splits
27 --> $DIR/suspicious_splitn.rs:12:13
29 LL | let _ = [0, 1, 2].splitn(0, |&x| x == 1);
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 = note: the resulting iterator will always return `None`
34 error: `splitn_mut` called with `0` splits
35 --> $DIR/suspicious_splitn.rs:13:13
37 LL | let _ = [0, 1, 2].splitn_mut(0, |&x| x == 1);
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = note: the resulting iterator will always return `None`
42 error: `splitn` called with `1` split
43 --> $DIR/suspicious_splitn.rs:14:13
45 LL | let _ = [0, 1, 2].splitn(1, |&x| x == 1);
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 = note: the resulting iterator will always return the entire slice followed by `None`
50 error: `rsplitn_mut` called with `1` split
51 --> $DIR/suspicious_splitn.rs:15:13
53 LL | let _ = [0, 1, 2].rsplitn_mut(1, |&x| x == 1);
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 = note: the resulting iterator will always return the entire slice followed by `None`
58 error: `splitn` called with `1` split
59 --> $DIR/suspicious_splitn.rs:18:13
61 LL | let _ = "a,b".splitn(X + 1, ',');
62 | ^^^^^^^^^^^^^^^^^^^^^^^^
64 = note: the resulting iterator will always return the entire string followed by `None`
66 error: `splitn` called with `0` splits
67 --> $DIR/suspicious_splitn.rs:19:13
69 LL | let _ = "a,b".splitn(X, ',');
70 | ^^^^^^^^^^^^^^^^^^^^
72 = note: the resulting iterator will always return `None`
74 error: aborting due to 9 previous errors