You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::env;
use std::ffi::OsString;
/* Explicit lifetimes are required by rust-2015-05-11 nightly (newer than playpen at the moment)
* Previously implicit lifetimes worked fine */
fn foo<'a, F>(bar: &'a F) -> Option<OsString>
where F: Fn(&'a str) -> Option<OsString>
{
bar("HOME")
}
fn main() {
println!("{:?}", foo(&env::var_os));
}