Closed
Description
#![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