Adopt let_else in even more places

This commit is contained in:
est31 2022-02-15 05:58:25 +01:00
parent 3cfa4def7c
commit 60f969a4f2
26 changed files with 50 additions and 104 deletions

View file

@ -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;
};

View file

@ -4,6 +4,7 @@
#![feature(crate_visibility_modifier)]
#![feature(if_let_guard)]
#![feature(box_patterns)]
#![feature(let_else)]
#![recursion_limit = "256"]
#[macro_use]