about summary refs log tree commit diff
path: root/tests/ui/functions-closures/closure-immediate.rs
blob: 0bda017de5a5c96f06ec5fc5879ed6f552dd6a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ run-pass

// After the work to reoptimize structs, it became possible for immediate logic to fail.
// This test verifies that it actually works.

fn main() {
    let c = |a: u8, b: u16, c: u8| {
        assert_eq!(a, 1);
        assert_eq!(b, 2);
        assert_eq!(c, 3);
    };
    c(1, 2, 3);
}