mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Don't generate fancy Clone + PartialEq bounds for #[animation(constant)]
This commit is contained in:
parent
e82d0c20a6
commit
c2e4a609a0
1 changed files with 0 additions and 18 deletions
|
@ -71,24 +71,6 @@ fn derive_variant_arm(
|
||||||
computations.append_all(iter.map(|(result, (this, other))| {
|
computations.append_all(iter.map(|(result, (this, other))| {
|
||||||
let field_attrs = cg::parse_field_attrs::<AnimationFieldAttrs>(&result.ast());
|
let field_attrs = cg::parse_field_attrs::<AnimationFieldAttrs>(&result.ast());
|
||||||
if field_attrs.constant {
|
if field_attrs.constant {
|
||||||
if cg::is_parameterized(&result.ast().ty, &where_clause.params, None) {
|
|
||||||
cg::add_predicate(
|
|
||||||
&mut where_clause.inner,
|
|
||||||
cg::where_predicate(
|
|
||||||
result.ast().ty.clone(),
|
|
||||||
&parse_quote!(std::cmp::PartialEq),
|
|
||||||
None,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
cg::add_predicate(
|
|
||||||
&mut where_clause.inner,
|
|
||||||
cg::where_predicate(
|
|
||||||
result.ast().ty.clone(),
|
|
||||||
&parse_quote!(std::clone::Clone),
|
|
||||||
None,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
quote! {
|
quote! {
|
||||||
if #this != #other {
|
if #this != #other {
|
||||||
return Err(());
|
return Err(());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue