Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created September 28, 2021 23:19
Show Gist options
  • Save rust-play/f02329ad916ec61a47ebd6f15f599b65 to your computer and use it in GitHub Desktop.
Save rust-play/f02329ad916ec61a47ebd6f15f599b65 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main() {
test(&|| 0);
}
fn test<T>(arg: &impl Fn() -> T)
where
for<'a> &'a T: Default,
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment