Adopt let_else in even more places
This commit is contained in:
parent
3cfa4def7c
commit
60f969a4f2
26 changed files with 50 additions and 104 deletions
|
@ -158,9 +158,7 @@ impl<'a> StringReader<'a> {
|
|||
Some(match token {
|
||||
rustc_lexer::TokenKind::LineComment { doc_style } => {
|
||||
// Skip non-doc comments
|
||||
let doc_style = if let Some(doc_style) = doc_style {
|
||||
doc_style
|
||||
} else {
|
||||
let Some(doc_style) = doc_style else {
|
||||
self.lint_unicode_text_flow(start);
|
||||
return None;
|
||||
};
|
||||
|
@ -185,9 +183,7 @@ impl<'a> StringReader<'a> {
|
|||
}
|
||||
|
||||
// Skip non-doc comments
|
||||
let doc_style = if let Some(doc_style) = doc_style {
|
||||
doc_style
|
||||
} else {
|
||||
let Some(doc_style) = doc_style else {
|
||||
self.lint_unicode_text_flow(start);
|
||||
return None;
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(let_else)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
#[macro_use]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue