Skip to content

Compiler crash on "if" without "else" in async fn #66387

Closed
@guzt

Description

@guzt
async fn f() -> Result<(), failure::Error> {
    if "a" != "b" {
        return Err("c".to_string());
    }
}

(Playground)

Triggers on playground on beta and nightly channels, not on stable.

Stacktrace: https://gist.github.com/guzt/32437a394c5c3401f8ec80a6863efe56

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-coroutinesArea: CoroutinesC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions