2024-07-11 08:44:03 -05:00
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:12:13
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if !set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::set-contains-or-insert` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::set_contains_or_insert)]`
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:17:12
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:22:13
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if !set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:26:14
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if !!set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:31:15
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if (&set).contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:36:13
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if !set.contains(borrow_value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(*borrow_value);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `HashSet::insert` after `HashSet::contains`
|
2024-08-08 12:13:50 -05:00
|
|
|
--> tests/ui/set_contains_or_insert.rs:41:20
|
2024-07-11 08:44:03 -05:00
|
|
|
|
|
|
|
|
LL | if !borrow_set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | borrow_set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
2024-08-08 12:13:50 -05:00
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:79:13
|
|
|
|
|
|
|
|
|
LL | if !set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:84:12
|
|
|
|
|
|
|
|
|
LL | if set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:89:13
|
|
|
|
|
|
|
|
|
LL | if !set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:93:14
|
|
|
|
|
|
|
|
|
LL | if !!set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:98:15
|
|
|
|
|
|
|
|
|
LL | if (&set).contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:103:13
|
|
|
|
|
|
|
|
|
LL | if !set.contains(borrow_value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL | set.insert(*borrow_value);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
|
|
|
|
--> tests/ui/set_contains_or_insert.rs:108:20
|
|
|
|
|
|
|
|
|
LL | if !borrow_set.contains(&value) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
LL | borrow_set.insert(value);
|
|
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
2024-07-11 08:44:03 -05:00
|
|
|
|