Skip to content

PlaceBuilder ICE, Part 2 #88118

@nikomatsakis

Description

@nikomatsakis

#88039 fixed #87987 but this issue still fails:

#![feature(capture_disjoint_fields)]

fn foo<MsU>(handler: impl FnOnce() -> MsU + Clone + 'static) {
    Box::new(move |value| {
        (|_| handler.clone()())(value);
        None
    }) as Box<dyn Fn(i32) -> Option<i32>>;
}

fn main() {}

Found trying to migrate seed 0.8.0.

Let me know if you need any more information.

Originally posted by @ehuss in #87987 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-closuresArea: Closures (`|…| { … }`)A-edition-2021Area: The 2021 editionI-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