rust/tests/ui/starts_ends_with.stderr

79 lines
2.7 KiB
Plaintext
Raw Normal View History

2017-10-09 22:45:03 -05:00
error: you should use the `starts_with` method
--> $DIR/starts_ends_with.rs:7:5
2018-10-06 11:18:06 -05:00
|
2018-12-27 09:57:55 -06:00
LL | "".chars().next() == Some(' ');
2018-10-06 11:18:06 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
--> $DIR/starts_ends_with.rs:8:5
|
2018-12-27 09:57:55 -06:00
LL | Some(' ') != "".chars().next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
2017-10-09 22:45:03 -05:00
error: you should use the `starts_with` method
--> $DIR/starts_ends_with.rs:13:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().next().unwrap() == 'f' {
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:17:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().next_back().unwrap() == '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
--> $DIR/starts_ends_with.rs:21:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().last().unwrap() == 'o' {
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
error: you should use the `starts_with` method
--> $DIR/starts_ends_with.rs:25:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().next().unwrap() != 'f' {
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:29:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().next_back().unwrap() != 'o' {
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:33:8
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | if s.chars().last().unwrap() != 'o' {
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:41:5
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | "".chars().last() == Some(' ');
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:42:5
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | Some(' ') != "".chars().last();
2017-10-09 22:45:03 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
error: you should use the `ends_with` method
--> $DIR/starts_ends_with.rs:43:5
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | "".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
--> $DIR/starts_ends_with.rs:44:5
2017-10-09 22:45:03 -05:00
|
2018-12-27 09:57:55 -06:00
LL | 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