rust/tests/ui/starts_ends_with.stderr

79 lines
2.8 KiB
Plaintext
Raw Normal View History

2017-10-09 22:45:03 -05:00
error: you should use the `starts_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:19:5
|
19 | "".chars().next() == Some(' ');
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
|
= note: `-D clippy::chars-next-cmp` implied by `-D warnings`
2017-10-09 22:45:03 -05:00
error: you should use the `starts_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:20:5
|
2018-10-06 11:18:06 -05:00
20 | Some(' ') != "".chars().next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
2017-10-09 22:45:03 -05:00
error: you should use the `starts_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:25:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
25 | if s.chars().next().unwrap() == 'f' { // s.starts_with('f')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:28:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
28 | if s.chars().next_back().unwrap() == 'o' { // s.ends_with('o')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
= note: `-D clippy::chars-last-cmp` implied by `-D warnings`
2017-10-09 22:45:03 -05:00
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:31:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
31 | if s.chars().last().unwrap() == 'o' { // s.ends_with('o')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
error: you should use the `starts_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:34:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
34 | if s.chars().next().unwrap() != 'f' { // !s.starts_with('f')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:37:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
37 | if s.chars().next_back().unwrap() != 'o' { // !s.ends_with('o')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:40:8
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
40 | if s.chars().last().unwrap() != 'o' { // !s.ends_with('o')
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:47:5
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
47 | "".chars().last() == Some(' ');
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:48:5
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
48 | Some(' ') != "".chars().last();
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:49:5
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
49 | "".chars().next_back() == Some(' ');
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
error: you should use the `ends_with` method
2018-10-06 11:18:06 -05:00
--> $DIR/starts_ends_with.rs:50:5
2017-10-09 22:45:03 -05:00
|
2018-10-06 11:18:06 -05:00
50 | Some(' ') != "".chars().next_back();
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
2018-01-16 10:06:27 -06:00
error: aborting due to 12 previous errors