mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
11 lines
178 B
Rust
11 lines
178 B
Rust
|
// Test that we can compile code that uses a `_` in function argument
|
||
|
// patterns.
|
||
|
|
||
|
fn foo((x, _): (int, int)) -> int {
|
||
|
x
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
assert_eq!(foo((22, 23)), 22);
|
||
|
}
|