2018-10-11 04:24:22 -05:00
|
|
|
// FIXME: Validation disabled due to https://github.com/rust-lang/rust/issues/54957
|
|
|
|
// compile-flags: -Zmiri-disable-validation
|
2017-08-28 07:53:43 -05:00
|
|
|
|
2017-08-28 07:10:59 -05:00
|
|
|
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
|
|
|
pub enum Foo {
|
|
|
|
A(&'static str),
|
|
|
|
_B,
|
|
|
|
_C,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
let mut b = std::collections::BTreeSet::new();
|
|
|
|
b.insert(Foo::A("\'"));
|
|
|
|
b.insert(Foo::A("/="));
|
|
|
|
b.insert(Foo::A("#"));
|
|
|
|
b.insert(Foo::A("0o"));
|
2018-10-11 04:24:22 -05:00
|
|
|
assert!(b.remove(&Foo::A("/=")));
|
|
|
|
assert!(!b.remove(&Foo::A("/=")));
|
2017-08-28 07:10:59 -05:00
|
|
|
}
|