]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/closure-reform-bad.rs
Move /src/test to /tests
[rust.git] / tests / ui / closures / closure-reform-bad.rs
1 /* Any copyright is dedicated to the Public Domain.
2  * http://creativecommons.org/publicdomain/zero/1.0/ */
3
4 fn call_bare(f: fn(&str)) {
5     f("Hello ");
6 }
7
8 fn main() {
9     let string = "world!";
10     let f = |s: &str| println!("{}{}", s, string);
11     call_bare(f)    //~ ERROR mismatched types
12 }