Permalink
Browse files

Move Visit trait bounds to where they’re needed

  • Loading branch information...
SimonSapin committed Jan 12, 2018
1 parent 1a6010f commit 358bac953d72eebace05a980d49f6d342b84bd21
Showing with 3 additions and 3 deletions.
  1. +3 −3 components/selectors/parser.rs
@@ -96,7 +96,7 @@ macro_rules! with_all_bounds {
/// non tree-structural pseudo-classes
/// (see: https://drafts.csswg.org/selectors/#structural-pseudos)
type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss + Visit<Impl = Self>;
type NonTSPseudoClass: $($CommonBounds)* + Sized + ToCss;
/// pseudo-elements
type PseudoElement: $($CommonBounds)* + PseudoElement<Impl = Self>;
@@ -326,7 +326,7 @@ impl AncestorHashes {
}
}
impl<Impl: SelectorImpl> Visit for Selector<Impl> {
impl<Impl: SelectorImpl> Visit for Selector<Impl> where Impl::NonTSPseudoClass: Visit<Impl=Impl> {
type Impl = Impl;
fn visit<V>(&self, visitor: &mut V) -> bool
@@ -356,7 +356,7 @@ impl<Impl: SelectorImpl> Visit for Selector<Impl> {
}
}
impl<Impl: SelectorImpl> Visit for Component<Impl> {
impl<Impl: SelectorImpl> Visit for Component<Impl> where Impl::NonTSPseudoClass: Visit<Impl=Impl> {
type Impl = Impl;
fn visit<V>(&self, visitor: &mut V) -> bool

0 comments on commit 358bac9

Please sign in to comment.