commit a6dba4a5db827a1d723bc4ae7d97f0a82000cfff
parent 91f63d6bae16f95f86a53300cfbcf0d96754173b
Author: noriaki watanabe <nabeyang@gmail.com>
Date: Tue, 23 Dec 2025 12:43:44 +0000
Bug 2007503 - Redundant 'outer_loop label in selector parser after loop refactoring r=emilio,firefox-style-system-reviewers
The selector parser previously relied on a labeled `'outer_loop` to break out
of nested loops when parsing combinators.
After recent refactoring, the nested loop structure no longer exists, and all
break statements target the same loop. As a result, the `'outer_loop` label and
the labeled `break 'outer_loop;` are redundant.
This change removes the unused loop label and replaces the labeled break with a
plain `break;`, simplifying the control flow without changing behavior.
Differential Revision: https://phabricator.services.mozilla.com/D277413
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/servo/components/selectors/parser.rs b/servo/components/selectors/parser.rs
@@ -2821,7 +2821,7 @@ where
ParseRelative::No => unreachable!(),
}
}
- 'outer_loop: loop {
+ loop {
// Parse a sequence of simple selectors.
let empty = parse_compound_selector(parser, &mut state, input, &mut builder)?;
if empty {
@@ -2845,7 +2845,7 @@ where
let combinator = if let Ok(c) = try_parse_combinator(input) {
c
} else {
- break 'outer_loop;
+ break;
};
if !state.allows_combinators() {