From 954419aab01264707f116899e77be682b02764ea Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 11 Sep 2024 13:32:53 -0400 Subject: Simplify some nested if statements --- compiler/rustc_parse/src/parser/path.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_parse/src/parser') 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; } -- cgit 1.4.1-3-g733a5