]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/starts_ends_with.stderr
iterate List by value
[rust.git] / tests / ui / starts_ends_with.stderr
index 7d73f201b692404d5250061459ff47cd97ff3947..7c726d0e010263ffca9352d1c41325cb042e9e86 100644 (file)
@@ -1,77 +1,77 @@
 error: you should use the `starts_with` method
--> $DIR/starts_ends_with.rs:7:5
-  |
-7 |     "".chars().next() == Some(' ');
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
-  |
-  = note: `-D chars-next-cmp` implied by `-D warnings`
 --> $DIR/starts_ends_with.rs:8:5
+   |
+LL |     "".chars().next() == Some(' ');
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
+   |
+   = note: `-D clippy::chars-next-cmp` implied by `-D warnings`
 
 error: you should use the `starts_with` method
--> $DIR/starts_ends_with.rs:8:5
-  |
-8 |     Some(' ') != "".chars().next();
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
 --> $DIR/starts_ends_with.rs:9:5
+   |
+LL |     Some(' ') != "".chars().next();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
 
 error: you should use the `starts_with` method
-  --> $DIR/starts_ends_with.rs:13:8
+  --> $DIR/starts_ends_with.rs:14:8
    |
-13 |     if s.chars().next().unwrap() == 'f' { // s.starts_with('f')
+LL |     if s.chars().next().unwrap() == 'f' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:16:8
+  --> $DIR/starts_ends_with.rs:18:8
    |
-16 |     if s.chars().next_back().unwrap() == 'o' { // s.ends_with('o')
+LL |     if s.chars().next_back().unwrap() == 'o' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
    |
-   = note: `-D chars-last-cmp` implied by `-D warnings`
+   = note: `-D clippy::chars-last-cmp` implied by `-D warnings`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:19:8
+  --> $DIR/starts_ends_with.rs:22:8
    |
-19 |     if s.chars().last().unwrap() == 'o' { // s.ends_with('o')
+LL |     if s.chars().last().unwrap() == 'o' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
 
 error: you should use the `starts_with` method
-  --> $DIR/starts_ends_with.rs:22:8
+  --> $DIR/starts_ends_with.rs:26:8
    |
-22 |     if s.chars().next().unwrap() != 'f' { // !s.starts_with('f')
+LL |     if s.chars().next().unwrap() != 'f' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:25:8
+  --> $DIR/starts_ends_with.rs:30:8
    |
-25 |     if s.chars().next_back().unwrap() != 'o' { // !s.ends_with('o')
+LL |     if s.chars().next_back().unwrap() != 'o' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:28:8
+  --> $DIR/starts_ends_with.rs:34:8
    |
-28 |     if s.chars().last().unwrap() != 'o' { // !s.ends_with('o')
+LL |     if s.chars().last().unwrap() != 'o' {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:35:5
+  --> $DIR/starts_ends_with.rs:42:5
    |
-35 |     "".chars().last() == Some(' ');
+LL |     "".chars().last() == Some(' ');
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:36:5
+  --> $DIR/starts_ends_with.rs:43:5
    |
-36 |     Some(' ') != "".chars().last();
+LL |     Some(' ') != "".chars().last();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:37:5
+  --> $DIR/starts_ends_with.rs:44:5
    |
-37 |     "".chars().next_back() == Some(' ');
+LL |     "".chars().next_back() == Some(' ');
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
 
 error: you should use the `ends_with` method
-  --> $DIR/starts_ends_with.rs:38:5
+  --> $DIR/starts_ends_with.rs:45:5
    |
-38 |     Some(' ') != "".chars().next_back();
+LL |     Some(' ') != "".chars().next_back();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
 
 error: aborting due to 12 previous errors