From edd9e5b7b12ed1093a87ba51e25443f7e1098c4f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 13 Feb 2019 17:22:06 +0100 Subject: [PATCH 1/2] test BTree a bit more --- tests/run-pass/btreemap.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/run-pass/btreemap.rs b/tests/run-pass/btreemap.rs index b7140d72ac..e2049d9480 100644 --- a/tests/run-pass/btreemap.rs +++ b/tests/run-pass/btreemap.rs @@ -1,3 +1,5 @@ +use std::collections::{BTreeMap, BTreeSet}; + #[derive(PartialEq, Eq, PartialOrd, Ord)] pub enum Foo { A(&'static str), @@ -6,11 +8,22 @@ pub enum Foo { } pub fn main() { - let mut b = std::collections::BTreeSet::new(); + let mut b = BTreeSet::new(); b.insert(Foo::A("\'")); b.insert(Foo::A("/=")); b.insert(Foo::A("#")); b.insert(Foo::A("0o")); assert!(b.remove(&Foo::A("/="))); assert!(!b.remove(&Foo::A("/="))); + + // Also test a lower-alignment type, where the NodeHeader overlaps with + // the keys. + let mut b = BTreeSet::new(); + b.insert(1024); + b.insert(7); + + let mut b = BTreeMap::new(); + b.insert("bar", 1024); + b.insert("baz", 7); + for _val in b.iter_mut() {} } From 8a779bc260646f7fb16ab24a463ad977a9e05c90 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 24 Feb 2019 12:22:53 +0100 Subject: [PATCH 2/2] bump Rust --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index cb6d9f177d..091e10fde3 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -nightly-2019-02-15 +nightly-2019-02-24