2020-07-02 00:32:12 -05:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![allow(unused)] // for rustfix
|
|
|
|
|
2018-08-11 15:25:48 -05:00
|
|
|
#[derive(Clone, Copy)]
|
|
|
|
struct S;
|
|
|
|
|
|
|
|
trait T {
|
|
|
|
fn foo((x, y): (i32, i32)); //~ ERROR patterns aren't allowed in methods without bodies
|
|
|
|
|
|
|
|
fn bar((x, y): (i32, i32)) {} //~ ERROR patterns aren't allowed in methods without bodies
|
2018-08-06 12:14:57 -05:00
|
|
|
|
2019-01-01 10:14:00 -06:00
|
|
|
fn method(S { .. }: S) {} //~ ERROR patterns aren't allowed in methods without bodies
|
|
|
|
|
2018-08-11 15:25:48 -05:00
|
|
|
fn f(&ident: &S) {} // ok
|
|
|
|
fn g(&&ident: &&S) {} // ok
|
|
|
|
fn h(mut ident: S) {} // ok
|
2018-08-03 20:23:21 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|