Add help suggesting matches
to let_chains
lint
This commit is contained in:
parent
e62a543344
commit
23bcea4249
3 changed files with 53 additions and 1 deletions
|
@ -639,7 +639,11 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
|
|||
};
|
||||
}
|
||||
gate_all!(if_let_guard, "`if let` guards are experimental");
|
||||
gate_all!(let_chains, "`let` expressions in this position are experimental");
|
||||
gate_all!(
|
||||
let_chains,
|
||||
"`let` expressions in this position are experimental",
|
||||
"you can write `matches!(<expr>, <pattern>)` instead of `let <pattern> = <expr>`"
|
||||
);
|
||||
gate_all!(
|
||||
async_closure,
|
||||
"async closures are unstable",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue