Closed
Description
Also fails with FnOnce
/ &mut
instead of Fn
/ &
(Seems like it's similar to issue #16549).
#![feature(unboxed_closures)]
pub fn foo<F: <'a> Fn<(&'a (),), ()>>(bar: F) {
bar.call((&(),));
}
fn main() {}
<anon>:3:15: 3:18 error: internal compiler error: cannot relate bound region: ReLateBound(11, BrNamed(syntax::ast::DefId{krate: 0u32, node: 17u32}, 'a)) <= ReInfer(55)
<anon>:3 bar.call((&(),));
^~~
note: the compiler hit an unexpected failure path. 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
task 'rustc' failed at 'Box<Any>', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:113