Fix obscure compilation error

This commit is contained in:
Masood Malekghassemi 2016-04-13 07:48:53 -07:00
parent e45c7955e9
commit de82fc4dc6
4 changed files with 16 additions and 9 deletions

View file

@ -17,7 +17,6 @@ fn bar<T: Fn(u32)>(_: T) {}
fn main() {
let x = X;
let closure = |_| foo(x);
//~^ ERROR the closure implements `FnOnce` but not `Fn`
let closure = |_| foo(x); //~ ERROR E0524
bar(closure);
}