]> git.lizzy.rs Git - rust.git/blob - tests/ui/not-enough-arguments.rs
Bless tests after rebase
[rust.git] / tests / ui / not-enough-arguments.rs
1 // Check that the only error msg we report is the
2 // mismatch between the # of params, and not other
3 // unrelated errors.
4
5 fn foo(a: isize, b: isize, c: isize, d:isize) {
6   panic!();
7 }
8
9 // Check that all arguments are shown in the error message, even if they're across multiple lines.
10 fn bar(
11     a: i32,
12     b: i32,
13     c: i32,
14     d: i32,
15     e: i32,
16     f: i32,
17 ) {
18     println!("{}", a);
19     println!("{}", b);
20     println!("{}", c);
21     println!("{}", d);
22     println!("{}", e);
23     println!("{}", f);
24 }
25
26 fn main() {
27   foo(1, 2, 3);
28   //~^ ERROR function takes 4 arguments but 3
29   bar(1, 2, 3);
30   //~^ ERROR function takes 6 arguments but 3
31 }