diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-11 13:32:53 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-11 13:45:23 -0400 |
| commit | 954419aab01264707f116899e77be682b02764ea (patch) | |
| tree | 9c66d40f49925803e11e7aebe913bf39297a9751 /compiler/rustc_parse/src/parser/path.rs | |
| parent | 5a2dd7d4f3210629e65879aeecbe643ba3b86bb4 (diff) | |
| download | rust-954419aab01264707f116899e77be682b02764ea.tar.gz rust-954419aab01264707f116899e77be682b02764ea.zip | |
Simplify some nested if statements
Diffstat (limited to 'compiler/rustc_parse/src/parser/path.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/path.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 8ee40ecd77e..42039c621d6 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -671,12 +671,12 @@ impl<'a> Parser<'a> { err.emit(); continue; } - if !self.token.kind.should_end_const_arg() { - if self.handle_ambiguous_unbraced_const_arg(&mut args)? { - // We've managed to (partially) recover, so continue trying to parse - // arguments. - continue; - } + if !self.token.kind.should_end_const_arg() + && self.handle_ambiguous_unbraced_const_arg(&mut args)? + { + // We've managed to (partially) recover, so continue trying to parse + // arguments. + continue; } break; } |
