blob: 54f7e9ac592eb536813361a295cc4f8408a70f3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
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() {}
|