Closed
Description
#![feature(const_fn)]
fn main() {}
const fn x() {
let t = true;
let x = || t;
}
rustc 1.14.0-nightly (3f4408347 2016-10-27)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
thread 'rustc' panicked at 'global closures can't capture anything', ../src/librustc_passes/consts.rs:587
note: Run with `RUST_BACKTRACE=1` for a backtrace.
(const fn tracking issue #24111)