aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/closure_in_closure.rs
blob: 1a003070f6a7cbf0f4e530194501933897f460ef (plain)
1
2
3
4
5
6
7
8
// { dg-additional-options "-frust-compile-until=ast" }
//
// Do not reformat this test! The default rust format settings will insert a
// space between closure parameter lists.
fn main() {
    let f = |_||x, y| x+y;
    assert_eq!(f(())(1, 2), 3);
}