2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2013-06-20 14:11:47 -05:00
|
|
|
// Test that we can compile code that uses a `_` in function argument
|
|
|
|
// patterns.
|
|
|
|
|
2015-03-22 15:13:15 -05:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn foo((x, _): (isize, isize)) -> isize {
|
2013-06-20 14:11:47 -05:00
|
|
|
x
|
|
|
|
}
|
|
|
|
|
2013-09-25 02:43:37 -05:00
|
|
|
pub fn main() {
|
2013-06-20 14:11:47 -05:00
|
|
|
assert_eq!(foo((22, 23)), 22);
|
|
|
|
}
|