Skip to content

ICE in tail_expr_drop_order lint #142155

Open
@matthiaskrgr

Description

@matthiaskrgr

Code

!! requires debug assertions !!

rustc a.rs --edition=2021

#![warn(tail_expr_drop_order)]
use core::future::Future;
use core::pin::Pin;

fn wrapped_fn<'a>() -> Pin<Box<(dyn Future<Output = Result<Box<()>, String>> + Send + 'static)>> {
    Box::pin(async { Err("nope".into()) })
}

pub fn main() {}

Meta

rustc --version --verbose:

c57119b9a1c86968188bb9703a7859c17f8bc71c

Error output

<output>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-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.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions