rust/tests/run-pass/btreemap.rs

18 lines
387 B
Rust
Raw Normal View History

// mir validation can't cope with `mem::uninitialized::<SomeEnum>()`
// compile-flags: -Zmir-emit-validate=0
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"));
}