summary refs log tree commit diff
path: root/src/test/ui/functions-closures/closure-inference2.rs
blob: f2dfa5888aac5764115f9b7eec3f69b95867b174 (plain)
1
2
3
4
5
6
7
8
9
// run-pass
// Test a rather underspecified example:


pub fn main() {
    let f = {|i| i};
    assert_eq!(f(2), 2);
    assert_eq!(f(5), 5);
}