summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/old-closure-explicit-types.rs
blob: 860fcc8df2101a412828f1296d73deb5a39ae729 (plain)
1
2
3
4
5
6
// run-pass

pub fn main() {
    fn as_buf<T, F>(s: String, f: F) -> T where F: FnOnce(String) -> T { f(s) }
    as_buf("foo".to_string(), |foo: String| -> () { println!("{}", foo) });
}