]> git.lizzy.rs Git - rust.git/blob - src/test/ui/argument-suggestions/issue-101097.rs
Make some diagnostics not depend on the source of what they reference being available
[rust.git] / src / test / ui / argument-suggestions / issue-101097.rs
1 struct A;
2 struct B;
3 struct C;
4 struct D;
5
6 fn f(
7     a1: A,
8     a2: A,
9     b1: B,
10     b2: B,
11     c1: C,
12     c2: C,
13 ) {}
14
15 fn main() {
16     f(C, A, A, A, B, B, C); //~ ERROR this function takes 6 arguments but 7 arguments were supplied [E0061]
17     f(C, C, A, A, B, B);  //~ ERROR arguments to this function are incorrect [E0308]
18     f(A, A, D, D, B, B);  //~ arguments to this function are incorrect [E0308]
19     f(C, C, B, B, A, A);  //~ arguments to this function are incorrect [E0308]
20     f(C, C, A, B, A, A);  //~ arguments to this function are incorrect [E0308]
21 }