diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:33:43 +0000 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2023-05-24 14:33:43 +0000 |
| commit | 307799a711826294bc2b3e562cd87bf1e2ff28b4 (patch) | |
| tree | 1aa6b91ab277015585998e92e9be35f80331d7a2 /compiler/rustc_parse/src/parser/diagnostics.rs | |
| parent | fb0f74a8c9e8b8f488ec5894d5d314caebf4c662 (diff) | |
| download | rust-307799a711826294bc2b3e562cd87bf1e2ff28b4.tar.gz rust-307799a711826294bc2b3e562cd87bf1e2ff28b4.zip | |
Use `is_some_and`/`is_ok_and` in less obvious spots
Diffstat (limited to 'compiler/rustc_parse/src/parser/diagnostics.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs index 681e0f79957..c1454039685 100644 --- a/compiler/rustc_parse/src/parser/diagnostics.rs +++ b/compiler/rustc_parse/src/parser/diagnostics.rs @@ -2610,7 +2610,7 @@ impl<'a> Parser<'a> { let TyKind::Path(qself, path) = &ty.kind else { return Ok(()) }; let qself_position = qself.as_ref().map(|qself| qself.position); for (i, segments) in path.segments.windows(2).enumerate() { - if qself_position.map(|pos| i < pos).unwrap_or(false) { + if qself_position.is_some_and(|pos| i < pos) { continue; } if let [a, b] = segments { |
