blob: 0ba48ab518442aa1b946fdbd24baca1f62408e2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
fn call_bare(f: fn(&str)) {
f("Hello ");
}
fn main() {
let string = "world!";
let f = |s: &str| println!("{}{}", s, string);
call_bare(f) //~ ERROR mismatched types
}
|