2020-07-02 05:32:12 +00:00
|
|
|
// run-rustfix
|
|
|
|
|
|
|
|
#![allow(unused)] // for rustfix
|
|
|
|
|
2018-08-11 20:25:48 +00: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 17:14:57 +00:00
|
|
|
|
2019-01-01 16:14:00 +00:00
|
|
|
fn method(S { .. }: S) {} //~ ERROR patterns aren't allowed in methods without bodies
|
|
|
|
|
2018-08-11 20:25:48 +00:00
|
|
|
fn f(&ident: &S) {} // ok
|
|
|
|
fn g(&&ident: &&S) {} // ok
|
|
|
|
fn h(mut ident: S) {} // ok
|
2018-08-04 01:23:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|