Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/72554.rs: fixed with errors #392

Merged
merged 1 commit into from
May 31, 2020
Merged

ices/72554.rs: fixed with errors #392

merged 1 commit into from
May 31, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#72554

use std::collections::BTreeSet;

#[derive(Hash)]
pub enum 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() {}
=== stdout ===
=== stderr ===
error[E0072]: recursive type `ElemDerived` has infinite size
 --> /home/runner/work/glacier/glacier/ices/72554.rs:4:1
  |
4 | pub enum ElemDerived {
  | ^^^^^^^^^^^^^^^^^^^^ recursive type has infinite size
5 |     A(ElemDerived)
  |       ----------- recursive without indirection
  |
  = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ElemDerived` representable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0072`.
==============

=== stdout ===
=== stderr ===
error[E0072]: recursive type `ElemDerived` has infinite size
 --> /home/runner/work/glacier/glacier/ices/72554.rs:4:1
  |
4 | pub enum ElemDerived {
  | ^^^^^^^^^^^^^^^^^^^^ recursive type has infinite size
5 |     A(ElemDerived)
  |       ----------- recursive without indirection
  |
  = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `ElemDerived` representable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0072`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by latest nightly.

@JohnTitor JohnTitor merged commit 62b647e into master May 31, 2020
@JohnTitor JohnTitor deleted the autofix/ices/72554.rs branch May 31, 2020 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants