selectors/*.rs - Put all the to_shmem attributes behind a "shmem" feature

This commit is contained in:
Federico Mena Quintero 2023-02-14 11:39:37 -06:00
parent 9dae402dc5
commit c78af6a32f
4 changed files with 48 additions and 33 deletions

View file

@ -193,7 +193,8 @@ fn split_from_end<T>(s: &[T], at: usize) -> (&[T], &[T]) {
bitflags! {
/// Flags that indicate at which point of parsing a selector are we.
#[derive(Default, ToShmem)]
#[derive(Default)]
#[cfg_attr(feature = "shmem", derive(ToShmem))]
pub (crate) struct SelectorFlags : u8 {
const HAS_PSEUDO = 1 << 0;
const HAS_SLOTTED = 1 << 1;
@ -201,7 +202,8 @@ bitflags! {
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, ToShmem)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "shmem", derive(ToShmem))]
pub struct SpecificityAndFlags {
/// There are two free bits here, since we use ten bits for each specificity
/// kind (id, class, element).