]> git.lizzy.rs Git - rust.git/blob - tests/ui/collapsible_str_replace.stderr
Adjust test cases; run cargo dev bless
[rust.git] / tests / ui / collapsible_str_replace.stderr
1 error: used consecutive `str::replace` call
2   --> $DIR/collapsible_str_replace.rs:18:24
3    |
4 LL |     let _ = misspelled.replace('s', "l").replace('u', "l");
5    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(|c| matches!(c, 'u' | 's'), "l")`
6    |
7    = note: `-D clippy::collapsible-str-replace` implied by `-D warnings`
8
9 error: used consecutive `str::replace` call
10   --> $DIR/collapsible_str_replace.rs:20:24
11    |
12 LL |     let _ = misspelled.replace('s', l).replace('u', l);
13    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(|c| matches!(c, 'u' | 's'), l)`
14
15 error: used consecutive `str::replace` call
16   --> $DIR/collapsible_str_replace.rs:22:24
17    |
18 LL |     let _ = misspelled.replace('s', "l").replace('u', "l").replace('p', "l");
19    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(|c| matches!(c, 'p' | 'u' | 's'), "l")`
20
21 error: used consecutive `str::replace` call
22   --> $DIR/collapsible_str_replace.rs:25:10
23    |
24 LL |           .replace('s', "l")
25    |  __________^
26 LL | |         .replace('u', "l")
27 LL | |         .replace('p', "l")
28 LL | |         .replace('d', "l");
29    | |__________________________^ help: replace with: `replace(|c| matches!(c, 'd' | 'p' | 'u' | 's'), "l")`
30
31 error: used consecutive `str::replace` call
32   --> $DIR/collapsible_str_replace.rs:33:24
33    |
34 LL |     let _ = misspelled.replace(s, "l").replace('u', "l");
35    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(&['u' , s], "l")`
36
37 error: used consecutive `str::replace` call
38   --> $DIR/collapsible_str_replace.rs:35:24
39    |
40 LL |     let _ = misspelled.replace(s, "l").replace('u', "l").replace('p', "l");
41    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(&['p' , 'u' , s], "l")`
42
43 error: used consecutive `str::replace` call
44   --> $DIR/collapsible_str_replace.rs:37:24
45    |
46 LL |     let _ = misspelled.replace(s, "l").replace(u, "l").replace('p', "l");
47    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(&['p' , u , s], "l")`
48
49 error: used consecutive `str::replace` call
50   --> $DIR/collapsible_str_replace.rs:39:24
51    |
52 LL |     let _ = misspelled.replace(s, "l").replace(u, "l").replace(p, "l");
53    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `replace(&[p , u , s], "l")`
54
55 error: aborting due to 8 previous errors
56