]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/old-closure-explicit-types.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / tests / 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 }