Skip to content

Commit 824662d

Browse files
authored
Rollup merge of #82048 - mark-i-m:or-pat-type-ascription, r=petrochenkov
or-patterns: disallow in `let` bindings ~~Blocked on #81869 Disallows top-level or-patterns before type ascription. We want to reserve this syntactic space for possible future generalized type ascription. r? ``@petrochenkov``
2 parents f3b68d3 + 7e4f5ca commit 824662d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_lints/src/loops.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,9 @@ struct MinifyingSugg<'a>(Sugg<'a>);
885885

886886
impl<'a> MinifyingSugg<'a> {
887887
fn as_str(&self) -> &str {
888-
let Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) = &self.0;
888+
let s = match &self.0 {
889+
Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s,
890+
};
889891
s.as_ref()
890892
}
891893

0 commit comments

Comments
 (0)