summaryrefslogtreecommitdiffstats
path: root/src/test/ui/functions-closures/closure-inference2.rs
blob: 4ce132e86caa4c89e5c2dadc7a513ba97585f499 (plain)
1
2
3
4
5
6
7
8
9
// run-pass
// Test a rather underspecified example:
#![allow(unused_braces)]

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