diff --git a/components/selectors/matching.rs b/components/selectors/matching.rs index 071c2bd9a96..3aeb84be779 100644 --- a/components/selectors/matching.rs +++ b/components/selectors/matching.rs @@ -470,15 +470,6 @@ where E: Element, F: FnMut(&E, ElementSelectorFlags), { - if cfg!(debug_assertions) { - if context.nesting_level == 0 && - context.shared.matching_mode == MatchingMode::ForStatelessPseudoElement { - assert!(iter.clone().any(|c| { - matches!(*c, Component::PseudoElement(..)) - })); - } - } - // If this is the special pseudo-element mode, consume the ::pseudo-element // before proceeding, since the caller has already handled that part. if context.nesting_level == 0 &&