We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76138c5 commit edd9e5bCopy full SHA for edd9e5b
tests/run-pass/btreemap.rs
@@ -1,3 +1,5 @@
1
+use std::collections::{BTreeMap, BTreeSet};
2
+
3
#[derive(PartialEq, Eq, PartialOrd, Ord)]
4
pub enum Foo {
5
A(&'static str),
@@ -6,11 +8,22 @@ pub enum Foo {
6
8
}
7
9
10
pub fn main() {
- let mut b = std::collections::BTreeSet::new();
11
+ let mut b = BTreeSet::new();
12
b.insert(Foo::A("\'"));
13
b.insert(Foo::A("/="));
14
b.insert(Foo::A("#"));
15
b.insert(Foo::A("0o"));
16
assert!(b.remove(&Foo::A("/=")));
17
assert!(!b.remove(&Foo::A("/=")));
18
19
+ // Also test a lower-alignment type, where the NodeHeader overlaps with
20
+ // the keys.
21
22
+ b.insert(1024);
23
+ b.insert(7);
24
25
+ let mut b = BTreeMap::new();
26
+ b.insert("bar", 1024);
27
+ b.insert("baz", 7);
28
+ for _val in b.iter_mut() {}
29
0 commit comments