1
1
error: replacing text with itself
2
- --> tests/ui/no_effect_replace.rs:6 :13
2
+ --> tests/ui/no_effect_replace.rs:4 :13
3
3
|
4
4
LL | let _ = "12345".replace('1', "1");
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,43 +8,43 @@ LL | let _ = "12345".replace('1', "1");
8
8
= help: to override `-D warnings` add `#[allow(clippy::no_effect_replace)]`
9
9
10
10
error: replacing text with itself
11
- --> tests/ui/no_effect_replace.rs:9 :13
11
+ --> tests/ui/no_effect_replace.rs:7 :13
12
12
|
13
13
LL | let _ = "12345".replace("12", "12");
14
14
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
15
16
16
error: replacing text with itself
17
- --> tests/ui/no_effect_replace.rs:11 :13
17
+ --> tests/ui/no_effect_replace.rs:9 :13
18
18
|
19
19
LL | let _ = String::new().replace("12", "12");
20
20
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
21
22
22
error: replacing text with itself
23
- --> tests/ui/no_effect_replace.rs:14 :13
23
+ --> tests/ui/no_effect_replace.rs:12 :13
24
24
|
25
25
LL | let _ = "12345".replacen('1', "1", 1);
26
26
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
27
28
28
error: replacing text with itself
29
- --> tests/ui/no_effect_replace.rs:16 :13
29
+ --> tests/ui/no_effect_replace.rs:14 :13
30
30
|
31
31
LL | let _ = "12345".replacen("12", "12", 1);
32
32
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
33
34
34
error: replacing text with itself
35
- --> tests/ui/no_effect_replace.rs:18 :13
35
+ --> tests/ui/no_effect_replace.rs:16 :13
36
36
|
37
37
LL | let _ = String::new().replacen("12", "12", 1);
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
39
40
40
error: replacing text with itself
41
- --> tests/ui/no_effect_replace.rs:25 :13
41
+ --> tests/ui/no_effect_replace.rs:23 :13
42
42
|
43
43
LL | let _ = "hello".replace(&x.f(), &x.f());
44
44
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
45
46
46
error: replacing text with itself
47
- --> tests/ui/no_effect_replace.rs:29 :13
47
+ --> tests/ui/no_effect_replace.rs:27 :13
48
48
|
49
49
LL | let _ = "hello".replace(&y(), &y());
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments