rust/src/test/run-pass/closure-inference2.rs

8 lines
121 B
Rust
Raw Normal View History

2012-02-05 12:08:14 -06:00
// Test a rather underspecified example:
fn main() {
let f = {|i| i};
assert f(2) == 2;
assert f(5) == 5;
}