2017-07-08 00:01:11 +00:00
|
|
|
#![deny(patterns_in_fns_without_body)]
|
|
|
|
|
2016-10-22 00:33:36 +00:00
|
|
|
trait Tr {
|
2020-01-29 23:18:54 +00:00
|
|
|
fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
|
2016-10-22 00:33:36 +00:00
|
|
|
//~^ WARN was previously accepted
|
2020-01-29 23:18:54 +00:00
|
|
|
fn f2(&arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
|
2016-10-22 00:33:36 +00:00
|
|
|
fn g1(arg: u8); // OK
|
|
|
|
fn g2(_: u8); // OK
|
2017-06-25 02:30:20 +00:00
|
|
|
#[allow(anonymous_parameters)]
|
2016-10-22 00:33:36 +00:00
|
|
|
fn g3(u8); // OK
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|