diff --git a/components/style/values/animated/mod.rs b/components/style/values/animated/mod.rs index ad81a4ecc4a..9e0653d8a00 100644 --- a/components/style/values/animated/mod.rs +++ b/components/style/values/animated/mod.rs @@ -35,6 +35,9 @@ pub mod effects; /// /// If the two values are not similar, an error is returned unless a fallback /// function has been specified through `#[animate(fallback)]`. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition. pub trait Animate: Sized { /// Animate a value towards another one, given an animation procedure. fn animate(&self, other: &Self, procedure: Procedure) -> Result; @@ -78,6 +81,9 @@ pub trait ToAnimatedValue { /// /// If a variant is annotated with `#[animation(error)]`, the corresponding /// `match` arm is not generated. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition. pub trait ToAnimatedZero: Sized { /// Returns a value that, when added with an underlying value, will produce the underlying /// value. This is used for SMIL animation's "by-animation" where SMIL first interpolates from diff --git a/components/style/values/distance.rs b/components/style/values/distance.rs index f17b9931dda..5f84f17caad 100644 --- a/components/style/values/distance.rs +++ b/components/style/values/distance.rs @@ -21,6 +21,10 @@ use std::ops::Add; /// /// If the two values are not similar, an error is returned unless a fallback /// function has been specified through `#[distance(fallback)]`. +/// +/// Trait bounds for type parameter `Foo` can be opted out of with +/// `#[animation(no_bound(Foo))]` on the type definition, trait bounds for +/// fields can be opted into with `#[distance(field_bound)]` on the field. pub trait ComputeSquaredDistance { /// Computes the squared distance between two animatable values. fn compute_squared_distance(&self, other: &Self) -> Result;