]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0642.stderr
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / ui / error-codes / E0642.stderr
1 error[E0642]: patterns aren't allowed in methods without bodies
2   --> $DIR/E0642.rs:9:12
3    |
4 LL |     fn foo((x, y): (i32, i32));
5    |            ^^^^^^
6    |
7 help: give this argument a name or use an underscore to ignore it
8    |
9 LL |     fn foo(_: (i32, i32));
10    |            ~
11
12 error[E0642]: patterns aren't allowed in methods without bodies
13   --> $DIR/E0642.rs:11:12
14    |
15 LL |     fn bar((x, y): (i32, i32)) {}
16    |            ^^^^^^
17    |
18 help: give this argument a name or use an underscore to ignore it
19    |
20 LL |     fn bar(_: (i32, i32)) {}
21    |            ~
22
23 error[E0642]: patterns aren't allowed in methods without bodies
24   --> $DIR/E0642.rs:13:15
25    |
26 LL |     fn method(S { .. }: S) {}
27    |               ^^^^^^^^
28    |
29 help: give this argument a name or use an underscore to ignore it
30    |
31 LL |     fn method(_: S) {}
32    |               ~
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0642`.