Skip to content

Instantly share code, notes, and snippets.

@phaazon

phaazon/a.rs

Created Feb 19, 2018
Embed
What would you like to do?
fn correct<F>(f: F) where F: for<'a> FnOnce(&'a u32) {
f(&3)
}
fn dafuck<F>(f: F) where for<'a> F: FnOnce(&'a u32) {
f(&3)
}
fn main() {
correct(|x| println!("{}", x));
dafuck(|x| println!("{}", x));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.