iflet Data::Enum(ref data) = self.base.data { // Adds errors for duplicate `#[darling(word)]` annotations across all variants. let word_variants: Vec<_> = data
.iter()
.filter_map(|variant| variant.word.as_ref())
.collect(); if word_variants.len() > 1 { for word in word_variants {
errors.push(
Error::custom("`#[darling(word)]` can only be applied to one variant")
.with_span(&word.span()),
);
}
}
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.