Fix obscure compilation error
This commit is contained in:
parent
e45c7955e9
commit
de82fc4dc6
4 changed files with 16 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue