]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0642.fixed
Rollup merge of #97915 - tbu-:pr_os_string_fmt_write, r=joshtriplett
[rust.git] / src / test / ui / error-codes / E0642.fixed
1 // run-rustfix
2
3 #![allow(unused)] // for rustfix
4
5 #[derive(Clone, Copy)]
6 struct S;
7
8 trait T {
9     fn foo(_: (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies
10
11     fn bar(_: (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies
12
13     fn method(_: S) {} //~ ERROR patterns aren't allowed in methods without bodies
14
15     fn f(&ident: &S) {} // ok
16     fn g(&&ident: &&S) {} // ok
17     fn h(mut ident: S) {} // ok
18 }
19
20 fn main() {}