test: Add a test that function argument patterns take in the expected type. r=test-only
This commit is contained in:
parent
976e1ced00
commit
9678abedec
8
src/test/run-pass/fn-pattern-expected-type.rs
Normal file
8
src/test/run-pass/fn-pattern-expected-type.rs
Normal file
@ -0,0 +1,8 @@
|
||||
fn main() {
|
||||
let f: fn((int,int)) = |(x, y)| {
|
||||
assert x == 1;
|
||||
assert y == 2;
|
||||
};
|
||||
f((1, 2));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user