Skip to content

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

Closed
@carllerche

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

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