diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-01-12 15:44:07 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-01-12 15:44:07 +0100 |
commit | 358bac953d72eebace05a980d49f6d342b84bd21 (patch) | |
tree | ce2c5fdec498756255fd4c4037f3b7d163a18ace /components/selectors/parser.rs | |
parent | 1a6010f19fc4064de8a285194dbace78770716ec (diff) | |
download | servo-358bac953d72eebace05a980d49f6d342b84bd21.tar.gz servo-358bac953d72eebace05a980d49f6d342b84bd21.zip |
Move Visit trait bounds to where they’re needed
Diffstat (limited to 'components/selectors/parser.rs')
-rw-r--r-- | components/selectors/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/selectors/parser.rs b/components/selectors/parser.rs index 5543914c3f6..465e6acaa8c 100644 --- a/components/selectors/parser.rs +++ b/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 |