style: Make rust generate better code for derive(Animate) and derive(ComputeSquaredDistance).

See https://github.com/rust-lang/rust/issues/68867.

This technically changes the semantics of #[animate(fallback)] and such when
combined with #[animate(error)]. But no such combination exists and the new
semantics are perfectly reasonable as well, IMHO.

Differential Revision: https://phabricator.services.mozilla.com/D61761
This commit is contained in:
Emilio Cobos Álvarez 2020-02-10 13:51:49 +00:00
parent 6876fed6e0
commit 71b414f9dc
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
4 changed files with 105 additions and 89 deletions

View file

@ -107,7 +107,7 @@ pub fn animate_multiplicative_factor(
/// be equal or an error is returned.
///
/// If a variant is annotated with `#[animation(error)]`, the corresponding
/// `match` arm is not generated.
/// `match` arm returns an error.
///
/// If the two values are not similar, an error is returned unless a fallback
/// function has been specified through `#[animate(fallback)]`.