2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2012-02-05 10:08:14 -08:00
|
|
|
// Test a rather underspecified example:
|
2020-03-27 21:56:19 +01:00
|
|
|
#![allow(unused_braces)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-02-01 12:44:15 -05:00
|
|
|
let f = {|i| i};
|
2015-01-25 22:05:03 +01:00
|
|
|
assert_eq!(f(2), 2);
|
|
|
|
assert_eq!(f(5), 5);
|
2012-02-05 10:08:14 -08:00
|
|
|
}
|