Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(async_await)]
- async fn foo<'a>(x: &'a i32) {
- println!("{}", x);
- }
- fn bar<F>(f: F)
- where
- F: for<'a> Fn(&'a i32)
- {
- let x = 7;
- f(&x);
- }
- fn main() {
- bar(foo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement