Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created January 6, 2015 19:32
Show Gist options
  • Save stepancheg/c64567fb1c48d664dad7 to your computer and use it in GitHub Desktop.
Save stepancheg/c64567fb1c48d664dad7 to your computer and use it in GitHub Desktop.
fn foo<F : FnMut()>(f: F)
{
foo(f);
foo(f);
}
// tmp3.rs:4:9: 4:10 error: use of moved value: `f`
// tmp3.rs:4 foo(f);
// ^
// tmp3.rs:3:9: 3:10 note: `f` moved here because it has type `F`, which is non-copyable
// tmp3.rs:3 foo(f);
// ^
// error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment