blob: 3b06b63182abb245ebfad04cfad445ea33250fb5 [file] [log] [blame]
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:12:13
|
LL | if !set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
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`
--> tests/ui/set_contains_or_insert.rs:18:12
|
LL | if set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:24:13
|
LL | if !set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:29:14
|
LL | if !!set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:35:15
|
LL | if (&set).contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:41:13
|
LL | if !set.contains(borrow_value) {
| ^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | set.insert(*borrow_value);
| ^^^^^^^^^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:47:20
|
LL | if !borrow_set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | borrow_set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:86:13
|
LL | if !set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:92:12
|
LL | if set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:98:13
|
LL | if !set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:103:14
|
LL | if !!set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:109:15
|
LL | if (&set).contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:115:13
|
LL | if !set.contains(borrow_value) {
| ^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | set.insert(*borrow_value);
| ^^^^^^^^^^^^^^^^^^^^^
error: usage of `BTreeSet::insert` after `BTreeSet::contains`
--> tests/ui/set_contains_or_insert.rs:121:20
|
LL | if !borrow_set.contains(&value) {
| ^^^^^^^^^^^^^^^^
LL |
LL | borrow_set.insert(value);
| ^^^^^^^^^^^^^
error: usage of `HashSet::insert` after `HashSet::contains`
--> tests/ui/set_contains_or_insert.rs:182:11
|
LL | if !s.contains(&v) {
| ^^^^^^^^^^^^
...
LL | s.insert(v);
| ^^^^^^^^^
error: aborting due to 15 previous errors