diff options
author | Ian P. Cooke <icooke@3redpartners.com> | 2021-07-07 06:37:04 -0500 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2021-07-16 21:31:29 +0200 |
commit | a380678490b821201f10b861144b15bbe08694a2 (patch) | |
tree | ade618adab094bfa8e6e248cdc0eef05bb08a5a4 /src/codegen/impl_partialeq.rs | |
parent | f65f2307f69a85cc7857b88409fe89c2bd2f79b7 (diff) |
Let Rust derive everything but Default for large arrays in 1.47 and later
Fixes #1977 as of rust-lang/rust#74060 is available since Rust 1.47
Fixes #2041.
Closes #2070.
Diffstat (limited to 'src/codegen/impl_partialeq.rs')
-rw-r--r-- | src/codegen/impl_partialeq.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codegen/impl_partialeq.rs b/src/codegen/impl_partialeq.rs index 5f2600e2..5a1ba3fe 100644 --- a/src/codegen/impl_partialeq.rs +++ b/src/codegen/impl_partialeq.rs @@ -114,7 +114,9 @@ fn gen_field( } TypeKind::Array(_, len) => { - if len <= RUST_DERIVE_IN_ARRAY_LIMIT { + if len <= RUST_DERIVE_IN_ARRAY_LIMIT || + ctx.options().rust_features().larger_arrays + { quote_equals(name_ident) } else { quote! { |