mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
14 lines
400 B
Rust
14 lines
400 B
Rust
#![deny(patterns_in_fns_without_body)]
|
|
|
|
trait Tr {
|
|
fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
|
|
//~^ WARN was previously accepted
|
|
fn f2(&arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
|
|
fn g1(arg: u8); // OK
|
|
fn g2(_: u8); // OK
|
|
#[allow(anonymous_parameters)]
|
|
fn g3(u8); // OK
|
|
}
|
|
|
|
fn main() {}
|