mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Opt out of trait bounds on type params for #[derive(Animate)]
This allows us to not generate trait bounds for field types anymore, by excluding bounds for type parameters used only in fields annotated with `#[animation(error)]`. The syntax is `#[animation(no_bound(Foo, Bar))]` where `Foo` is a type parameter for the type on which we derive things. Ideally this should be an attribute on the type parameter but this isn't stable yet.
This commit is contained in:
parent
29e10d4f88
commit
5cc2d7c4b3
3 changed files with 24 additions and 13 deletions
|
@ -43,6 +43,7 @@ pub enum ShapeBox {
|
|||
|
||||
/// A shape source, for some reference box.
|
||||
#[allow(missing_docs)]
|
||||
#[animate(no_bound(ImageOrUrl))]
|
||||
#[derive(Animate, Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> {
|
||||
#[animation(error)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue