fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.6 KiB53 linesraw
1error: replacing text with itself
2  --> $DIR/no_effect_replace.rs:4:13
3   |
4LL |     let _ = "12345".replace('1', "1");
5   |             ^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7   = note: `-D clippy::no-effect-replace` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::no_effect_replace)]`
9
10error: replacing text with itself
11  --> $DIR/no_effect_replace.rs:7:13
12   |
13LL |     let _ = "12345".replace("12", "12");
14   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
16error: replacing text with itself
17  --> $DIR/no_effect_replace.rs:9:13
18   |
19LL |     let _ = String::new().replace("12", "12");
20   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
22error: replacing text with itself
23  --> $DIR/no_effect_replace.rs:12:13
24   |
25LL |     let _ = "12345".replacen('1', "1", 1);
26   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27
28error: replacing text with itself
29  --> $DIR/no_effect_replace.rs:14:13
30   |
31LL |     let _ = "12345".replacen("12", "12", 1);
32   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
34error: replacing text with itself
35  --> $DIR/no_effect_replace.rs:16:13
36   |
37LL |     let _ = String::new().replacen("12", "12", 1);
38   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
40error: replacing text with itself
41  --> $DIR/no_effect_replace.rs:23:13
42   |
43LL |     let _ = "hello".replace(&x.f(), &x.f());
44   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46error: replacing text with itself
47  --> $DIR/no_effect_replace.rs:27:13
48   |
49LL |     let _ = "hello".replace(&y(), &y());
50   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
52error: aborting due to 8 previous errors
53