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