summary refs log tree commit diff
path: root/src/test/run-pass/func-arg-wild-pattern.rs
blob: ec58198d4a34823e0c245805a1b29b01876b59d6 (plain)
1
2
3
4
5
6
7
8
9
10
// Test that we can compile code that uses a `_` in function argument
// patterns.

fn foo((x, _): (int, int)) -> int {
    x
}

pub fn main() {
    assert_eq!(foo((22, 23)), 22);
}