We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22bc9e1 commit 576c215Copy full SHA for 576c215
src/test/ui/issues/issue-50571.rs
@@ -0,0 +1,6 @@
1
+trait Foo {
2
+ fn foo([a, b]: [i32; 2]) {}
3
+ //~^ ERROR: patterns aren't allowed in methods without bodies
4
+}
5
+
6
+fn main() {}
src/test/ui/issues/issue-50571.stderr
@@ -0,0 +1,13 @@
+error[E0642]: patterns aren't allowed in methods without bodies
+ --> $DIR/issue-50571.rs:2:12
+ |
+LL | fn foo([a, b]: [i32; 2]) {}
+ | ^^^^^^
+help: give this argument a name or use an underscore to ignore it
7
8
+LL | fn foo(_: [i32; 2]) {}
9
+ | ^
10
11
+error: aborting due to previous error
12
13
+For more information about this error, try `rustc --explain E0642`.
0 commit comments