rust/tests/ui/enum-discriminant/issue-72554.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
353 B
Rust
Raw Normal View History

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