]> git.lizzy.rs Git - rust.git/blob - src/test/ui/E0642.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / E0642.rs
1 #[derive(Clone, Copy)]
2 struct S;
3
4 trait T {
5     fn foo((x, y): (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies
6
7     fn bar((x, y): (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies
8
9     fn method(S { .. }: S) {} //~ ERROR patterns aren't allowed in methods without bodies
10
11     fn f(&ident: &S) {} // ok
12     fn g(&&ident: &&S) {} // ok
13     fn h(mut ident: S) {} // ok
14 }
15
16 fn main() {}