Skip to content

ICE: rustc stack overflow error w/ recursive types #17882

Closed

Description

@carllerche

Given the following code:

trait Stream<T, N: Stream<T>> {
}

pub fn main() {
    println!("zomg");
}

Running rustc gives the following output:

task 'rustc' has overflowed its stack
[1]    47380 illegal hardware instruction  rustc types.rs

Activity

  1. nikomatsakis commented on Oct 9, 2014

    @nikomatsakis
    Contributor

    cc me

  2. nikomatsakis commented on Oct 9, 2014

    @nikomatsakis
    Contributor

    this is probably a dup of some other bug. The root cause is that we put need to convert the list of bounds at the same time as processing the trait definition. As part of my branch for generalized where clauses I've changed how this works, which ought to circumvent this error -- I'm not sure what's a shorter term fix.

  3. mbrubeck commented on Nov 14, 2014

    @mbrubeck
    Contributor

    Duplicate of #15477?

  4. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Dec 28, 2014
  5. huonw commented on Dec 28, 2014

    @huonw
    Contributor

    Closing as a dupe of #15477. Thanks for filing!

  6. added a commit that references this issue on Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions