2013-06-20 19:11:47 +00:00
|
|
|
// Test that we can compile code that uses a `_` in function argument
|
|
|
|
// patterns.
|
|
|
|
|
|
|
|
fn foo((x, _): (int, int)) -> int {
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
2013-09-25 07:43:37 +00:00
|
|
|
pub fn main() {
|
2013-06-20 19:11:47 +00:00
|
|
|
assert_eq!(foo((22, 23)), 22);
|
|
|
|
}
|