Skip to content

ICE with higher-ranked lifetimes #48112

Closed
@asajeffrey

Description

@asajeffrey

In the middle of mucking around with coding existential lifetime polymorphism with higher-ranked lifetimes, I got an ICE. No surprise there.

https://play.rust-lang.org/?gist=b09f418c9fd12193515708d11ec80eb2&version=stable

produces

Standard Error

   Compiling playground v0.0.1 (file:///playground)
error: internal compiler error: /checkout/src/librustc/traits/trans/mod.rs:66: Encountered error `OutputTypeParameterMismatch(Binder(<[closure@src/main.rs:145:32: 148:18] as std::ops::FnOnce<(<*mut std::string::String as Unpack<'_>>::Unpacked,)>>), Binder(<[closure@src/main.rs:145:32: 148:18] as std::ops::FnOnce<(&mut std::string::String,)>>), Sorts(ExpectedFound { expected: &mut std::string::String, found: <*mut std::string::String as Unpack<'_>>::Unpacked }))` selecting `Binder(<[closure@src/main.rs:145:32: 148:18] as std::ops::FnOnce<(&mut std::string::String,)>>)` during trans

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.23.0 (766bd11c8 2018-01-01) running on x86_64-unknown-linux-gnu

thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:471:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

error: Could not compile `playground`.

To learn more, run the command again with --verbose.

I'm afraid it's as far from a small self-contained example as possible, sigh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lifetimesArea: Lifetimes / regionsC-bugCategory: This is a bug.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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions