]> git.lizzy.rs Git - rust.git/blob - tests/ui/functions-closures/closure-inference2.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / functions-closures / closure-inference2.rs
1 // run-pass
2 // Test a rather underspecified example:
3 #![allow(unused_braces)]
4
5 pub fn main() {
6     let f = {|i| i};
7     assert_eq!(f(2), 2);
8     assert_eq!(f(5), 5);
9 }