Skip to content

impl Trait ICE returning a recursive type #36792

Closed
@durka

Description

@durka

We were trying to make a function that returns itself.

#![feature(conservative_impl_trait)]
fn foo() -> impl Copy {
    foo
}

rustc overflows its stack.

cc @aturon

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.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