Skip to content

Commit 99d0519

Browse files
committed
Clippy: HACK! Fix bootstrap error
This will be removed in the next sync, once beta is at 1.52. Until then this hack avoids to put `cfg(bootstrap)` into Clippy.
1 parent 412ebc3 commit 99d0519

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/tools/clippy/clippy_lints/src/loops/manual_memcpy.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,11 @@ struct MinifyingSugg<'a>(Sugg<'a>);
203203

204204
impl<'a> MinifyingSugg<'a> {
205205
fn as_str(&self) -> &str {
206-
let (Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s)) = &self.0;
207-
s.as_ref()
206+
// HACK: Don't sync to Clippy! Required because something with the `or_patterns` feature
207+
// changed and this would now require parentheses.
208+
match &self.0 {
209+
Sugg::NonParen(s) | Sugg::MaybeParen(s) | Sugg::BinOp(_, s) => s.as_ref(),
210+
}
208211
}
209212

210213
fn into_sugg(self) -> Sugg<'a> {

0 commit comments

Comments
 (0)