Skip to content

ICE from higher ranked subtyping #67498

Closed
@matthewjasper

Description

@matthewjasper

The following code ICEs

fn f<'a, 'b, 'd, 'e> (
    x: for<'c> fn(
        fn(&'c fn(&'c ())),
        fn(&'c fn(&'c ())),
        fn(&'c fn(&'c ())),
        fn(&'c fn(&'c ())),
    )
) -> fn(
        fn(&'a fn(&'d ())),
        fn(&'b fn(&'d ())),
        fn(&'a fn(&'e ())),
        fn(&'b fn(&'e ())),
) {
    x
}

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=169cdb4aaa19abce2baa2b45e876f797

Metadata

Metadata

Assignees

Labels

A-lifetimesArea: Lifetimes / regionsC-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions