rust/src/test/ui/E0642.rs

15 lines
342 B
Rust
Raw Normal View History

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-11 15:25:48 -05:00
fn f(&ident: &S) {} // ok
fn g(&&ident: &&S) {} // ok
fn h(mut ident: S) {} // ok
}
fn main() {}