rust/tests/ui/starts_ends_with.stderr

79 lines
2.7 KiB
Text
Raw Normal View History

2017-10-10 05:45:03 +02:00
error: you should use the `starts_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:16:5
2018-10-06 18:18:06 +02:00
|
2018-12-27 16:57:55 +01:00
LL | "".chars().next() == Some(' ');
2018-10-06 18:18:06 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
|
= note: `-D clippy::chars-next-cmp` implied by `-D warnings`
2017-10-10 05:45:03 +02:00
error: you should use the `starts_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:17:5
|
2018-12-27 16:57:55 +01:00
LL | Some(' ') != "".chars().next();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
2017-10-10 05:45:03 +02:00
error: you should use the `starts_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:22:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().next().unwrap() == 'f' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:26:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().next_back().unwrap() == 'o' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
= note: `-D clippy::chars-last-cmp` implied by `-D warnings`
2017-10-10 05:45:03 +02:00
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:30:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().last().unwrap() == 'o' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
error: you should use the `starts_with` method
2018-10-06 18:18:06 +02:00
--> $DIR/starts_ends_with.rs:34:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().next().unwrap() != 'f' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:38:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().next_back().unwrap() != 'o' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:42:8
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | if s.chars().last().unwrap() != 'o' {
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:50:5
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | "".chars().last() == Some(' ');
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:51:5
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | Some(' ') != "".chars().last();
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:52:5
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | "".chars().next_back() == Some(' ');
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
error: you should use the `ends_with` method
2018-12-10 06:27:19 +01:00
--> $DIR/starts_ends_with.rs:53:5
2017-10-10 05:45:03 +02:00
|
2018-12-27 16:57:55 +01:00
LL | Some(' ') != "".chars().next_back();
2017-10-10 05:45:03 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
2018-01-16 17:06:27 +01:00
error: aborting due to 12 previous errors