rust/src/test/run-pass/func-arg-wild-pattern.rs

11 lines
182 B
Rust
Raw Normal View History

// 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);
}