]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no-patterns-in-args-2.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / no-patterns-in-args-2.rs
1 #![deny(patterns_in_fns_without_body)]
2
3 trait Tr {
4     fn f1(mut arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
5                         //~^ WARN was previously accepted
6     fn f2(&arg: u8); //~ ERROR patterns aren't allowed in functions without bodies
7     fn g1(arg: u8); // OK
8     fn g2(_: u8); // OK
9     #[allow(anonymous_parameters)]
10     fn g3(u8); // OK
11 }
12
13 fn main() {}