]> git.lizzy.rs Git - rust.git/blob - tests/ui/no-patterns-in-args-2.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / 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() {}