style: Avoid generic soup and extra reference count bumps

This makes me a bit happier about the previous patch :)

Differential Revision: https://phabricator.services.mozilla.com/D165236
This commit is contained in:
Emilio Cobos Álvarez 2022-12-29 00:23:28 +00:00 committed by Martin Robinson
parent cceb538eb0
commit 92742f7f90
7 changed files with 32 additions and 24 deletions

View file

@ -202,7 +202,7 @@ macro_rules! with_all_bounds {
/// are parameterized on SelectorImpl. See
/// <https://github.com/rust-lang/rust/issues/26925>
pub trait SelectorImpl: Clone + Debug + Sized + 'static {
type ExtraMatchingData: Sized + Default + 'static;
type ExtraMatchingData<'a>: Sized + Default;
type AttrValue: $($InSelector)*;
type Identifier: $($InSelector)*;
type LocalName: $($InSelector)* + Borrow<Self::BorrowedLocalName>;
@ -2638,7 +2638,7 @@ pub mod tests {
}
impl SelectorImpl for DummySelectorImpl {
type ExtraMatchingData = ();
type ExtraMatchingData<'a> = std::marker::PhantomData<&'a ()>;
type AttrValue = DummyAttrValue;
type Identifier = DummyAtom;
type LocalName = DummyAtom;