diff options
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 6396e953..607ceafe 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -1642,7 +1642,10 @@ impl CodeGenerator for CompInfo { ctx.options().derive_copy { derives.push("Copy"); - if used_template_params.is_some() { + + if ctx.options().rust_features().builtin_clone_impls() || + used_template_params.is_some() + { // FIXME: This requires extra logic if you have a big array in a // templated struct. The reason for this is that the magic: // fn clone(&self) -> Self { *self } |