2020-05-28 20:20:37 -05:00
|
|
|
use std::collections::BTreeSet;
|
|
|
|
|
|
|
|
#[derive(Hash)]
|
2022-07-18 05:31:34 -05:00
|
|
|
pub enum ElemDerived {
|
|
|
|
//~^ ERROR recursive type `ElemDerived` has infinite size
|
2020-05-28 20:20:37 -05:00
|
|
|
A(ElemDerived)
|
|
|
|
}
|
|
|
|
|
2022-07-18 05:31:34 -05:00
|
|
|
|
2020-05-28 20:20:37 -05:00
|
|
|
pub enum Elem {
|
|
|
|
Derived(ElemDerived)
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Set(BTreeSet<Elem>);
|
|
|
|
|
|
|
|
impl Set {
|
|
|
|
pub fn into_iter(self) -> impl Iterator<Item = Elem> {
|
|
|
|
self.0.into_iter()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|