]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/entry_unfixable.stderr
iterate List by value
[rust.git] / tests / ui / entry_unfixable.stderr
index ab655fcfead6c55f589d4c2d2a31a21929d3ef60..e58c8d22dc45e2bc6303f3afeb8dd813ded7c42f 100644 (file)
@@ -6,18 +6,9 @@ LL | |         m.insert(k, v)
 LL | |     } else {
 LL | |         None
 LL | |     };
-   | |_____^
+   | |_____^ consider using `m.entry(k)`
    |
    = note: `-D clippy::map-entry` implied by `-D warnings`
-help: consider using `m.entry(k)`
-  --> $DIR/entry_unfixable.rs:10:5
-   |
-LL | /     if !m.contains_key(&k) {
-LL | |         m.insert(k, v)
-LL | |     } else {
-LL | |         None
-LL | |     };
-   | |_____^
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
   --> $DIR/entry_unfixable.rs:18:5
@@ -27,17 +18,7 @@ LL | |         None
 LL | |     } else {
 LL | |         m.insert(k, v)
 LL | |     };
-   | |_____^
-   |
-help: consider using `m.entry(k)`
-  --> $DIR/entry_unfixable.rs:18:5
-   |
-LL | /     if m.contains_key(&k) {
-LL | |         None
-LL | |     } else {
-LL | |         m.insert(k, v)
-LL | |     };
-   | |_____^
+   | |_____^ consider using `m.entry(k)`
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
   --> $DIR/entry_unfixable.rs:26:5
@@ -48,18 +29,7 @@ LL | |         m.insert(k, v)
 LL | |     } else {
 LL | |         None
 LL | |     };
-   | |_____^
-   |
-help: consider using `m.entry(k)`
-  --> $DIR/entry_unfixable.rs:26:5
-   |
-LL | /     if !m.contains_key(&k) {
-LL | |         foo();
-LL | |         m.insert(k, v)
-LL | |     } else {
-LL | |         None
-LL | |     };
-   | |_____^
+   | |_____^ consider using `m.entry(k)`
 
 error: usage of `contains_key` followed by `insert` on a `HashMap`
   --> $DIR/entry_unfixable.rs:35:5
@@ -70,18 +40,7 @@ LL | |     } else {
 LL | |         foo();
 LL | |         m.insert(k, v)
 LL | |     };
-   | |_____^
-   |
-help: consider using `m.entry(k)`
-  --> $DIR/entry_unfixable.rs:35:5
-   |
-LL | /     if m.contains_key(&k) {
-LL | |         None
-LL | |     } else {
-LL | |         foo();
-LL | |         m.insert(k, v)
-LL | |     };
-   | |_____^
+   | |_____^ consider using `m.entry(k)`
 
 error: usage of `contains_key` followed by `insert` on a `BTreeMap`
   --> $DIR/entry_unfixable.rs:44:5
@@ -92,18 +51,7 @@ LL | |         m.insert(k, v)
 LL | |     } else {
 LL | |         None
 LL | |     };
-   | |_____^
-   |
-help: consider using `m.entry(k)`
-  --> $DIR/entry_unfixable.rs:44:5
-   |
-LL | /     if !m.contains_key(&k) {
-LL | |         foo();
-LL | |         m.insert(k, v)
-LL | |     } else {
-LL | |         None
-LL | |     };
-   | |_____^
+   | |_____^ consider using `m.entry(k)`
 
 error: aborting due to 5 previous errors