]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/old-closure-explicit-types.rs
Auto merge of #84267 - dtolnay:ptrunit, r=nagisa
[rust.git] / src / test / ui / closures / old-closure-explicit-types.rs
1 // run-pass
2
3 pub fn main() {
4     fn as_buf<T, F>(s: String, f: F) -> T where F: FnOnce(String) -> T { f(s) }
5     as_buf("foo".to_string(), |foo: String| -> () { println!("{}", foo) });
6 }