Closed
Description
code sample:
static mut add2: Box<FnMut() -> i32> = Box::new((||{let mut a = 0; move || {a+=1;a}})());
compiler complans:
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
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: fcx.inh.deferred_call_resolutions.borrow().is_empty()', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_typeck/check/vtable.rs:268