diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-72554.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-72554.rs b/src/test/ui/issues/issue-72554.rs new file mode 100644 index 000000000..7287639c6 --- /dev/null +++ b/src/test/ui/issues/issue-72554.rs @@ -0,0 +1,23 @@ +use std::collections::BTreeSet; + +#[derive(Hash)] +pub enum ElemDerived { + //~^ ERROR recursive type `ElemDerived` has infinite size + //~| ERROR cycle detected when computing drop-check constraints for `ElemDerived` + 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() {} |