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