Skip to content

ICE from higher ranked subtyping #67498

@matthewjasper

Description

@matthewjasper
Contributor

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

Activity

added
A-lifetimesArea: Lifetimes / regions
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
C-bugCategory: This is a bug.
on Dec 21, 2019
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Dec 21, 2019
JohnTitor

JohnTitor commented on Jun 8, 2022

@JohnTitor
Member

Triage: Fixed by #95565, marking as E-needs-test.

added
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
on Jun 8, 2022
added a commit that references this issue on Jun 8, 2022
added a commit that references this issue on Jun 8, 2022
a36671a
added a commit that references this issue on Jun 8, 2022
c84db32
added a commit that references this issue on Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Participants

    @Centril@matthewjasper@JohnTitor@rust-lang-glacier-bot

    Issue actions

      ICE from higher ranked subtyping · Issue #67498 · rust-lang/rust