rust/tests/ui/enum-discriminant/issue-72554.rs
2023-01-11 09:32:08 +00:00

23 lines
353 B
Rust

use std::collections::BTreeSet;
#[derive(Hash)]
pub enum ElemDerived {
//~^ ERROR recursive type `ElemDerived` has infinite size
A(ElemDerived)
}
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() {}