rust/src/test/run-pass/func-arg-wild-pattern.rs
Alex Crichton 30862a64c2 Fix run-pass tests to have 'pub fn main'
This is required by the check-fast target because each test is slurped up into a
submodule.
2013-09-25 00:43:37 -07:00

11 lines
182 B
Rust

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