Skip to content

[ICE] hir with fn_must_use #46300

Closed
Closed
@leonardo-m

Description

@leonardo-m
#![feature(fn_must_use)]
fn bar(n: u32) -> Box<Fn(u32) -> u32> {
    Box::new(move |_| { n })
}
fn main() {
    let baz = bar(1);
    baz(1);
}
error: internal compiler error: src\librustc\hir\def.rs:166: attempted .def_id() on invalid def: Local(NodeId(27))

note: rustc 1.23.0-nightly (827cb0d61 2017-11-26) running on x86_64-pc-windows-gnu

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:501:8

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-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) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions