fork/rust

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

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

master
2.2 KiB53 linesraw
1error: found call to `str::trim` before `str::split_whitespace`
2  --> $DIR/trim_split_whitespace.rs:61:23
3   |
4LL |     let _ = " A B C ".trim().split_whitespace(); // should trigger lint
5   |                       ^^^^^^^ help: remove `trim()`
6   |
7   = note: `-D clippy::trim-split-whitespace` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::trim_split_whitespace)]`
9
10error: found call to `str::trim_start` before `str::split_whitespace`
11  --> $DIR/trim_split_whitespace.rs:62:23
12   |
13LL |     let _ = " A B C ".trim_start().split_whitespace(); // should trigger lint
14   |                       ^^^^^^^^^^^^^ help: remove `trim_start()`
15
16error: found call to `str::trim_end` before `str::split_whitespace`
17  --> $DIR/trim_split_whitespace.rs:63:23
18   |
19LL |     let _ = " A B C ".trim_end().split_whitespace(); // should trigger lint
20   |                       ^^^^^^^^^^^ help: remove `trim_end()`
21
22error: found call to `str::trim` before `str::split_whitespace`
23  --> $DIR/trim_split_whitespace.rs:66:37
24   |
25LL |     let _ = (" A B C ").to_string().trim().split_whitespace(); // should trigger lint
26   |                                     ^^^^^^^ help: remove `trim()`
27
28error: found call to `str::trim_start` before `str::split_whitespace`
29  --> $DIR/trim_split_whitespace.rs:67:37
30   |
31LL |     let _ = (" A B C ").to_string().trim_start().split_whitespace(); // should trigger lint
32   |                                     ^^^^^^^^^^^^^ help: remove `trim_start()`
33
34error: found call to `str::trim_end` before `str::split_whitespace`
35  --> $DIR/trim_split_whitespace.rs:68:37
36   |
37LL |     let _ = (" A B C ").to_string().trim_end().split_whitespace(); // should trigger lint
38   |                                     ^^^^^^^^^^^ help: remove `trim_end()`
39
40error: found call to `str::trim` before `str::split_whitespace`
41  --> $DIR/trim_split_whitespace.rs:75:15
42   |
43LL |     let _ = s.trim().split_whitespace(); // should trigger lint
44   |               ^^^^^^^ help: remove `trim()`
45
46error: found call to `str::trim` before `str::split_whitespace`
47  --> $DIR/trim_split_whitespace.rs:83:15
48   |
49LL |     let _ = s.trim().split_whitespace(); // should trigger lint
50   |               ^^^^^^^ help: remove `trim()`
51
52error: aborting due to 8 previous errors
53