]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/entry_btree.stderr
New upstream version 1.74.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / entry_btree.stderr
CommitLineData
c295e0f8 1error: usage of `contains_key` followed by `insert` on a `BTreeMap`
781aab86 2 --> $DIR/entry_btree.rs:10:5
c295e0f8
XL
3 |
4LL | / if !m.contains_key(&k) {
5LL | | m.insert(k, v);
6LL | | foo();
7LL | | }
8 | |_____^
9 |
10 = note: `-D clippy::map-entry` implied by `-D warnings`
781aab86 11 = help: to override `-D warnings` add `#[allow(clippy::map_entry)]`
add651ee 12help: try
c295e0f8
XL
13 |
14LL ~ if let std::collections::btree_map::Entry::Vacant(e) = m.entry(k) {
15LL + e.insert(v);
16LL + foo();
17LL + }
18 |
19
20error: aborting due to previous error
21