Closed
Description
Compiling hyper v0.1.1 (file:///home/manishearth/Mozilla/Git/hyper)
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: !generic_bounds.has_escaping_regions()', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_typeck/check/mod.rs:2281
I was trying to use unboxed closures in Hyper, and I came across this.
Here's the commit where it got introduced.
The following MWE also causes the ICE:
#![feature(unboxed_closures)]
pub struct HttpConnector<T = NoSslVerify>(Option<T>);
pub struct NoSslVerify;
impl Fn(&mut u8) -> () for NoSslVerify {
#[inline(always)]
fn call(&self, _: (&mut u8)) {}
}