diff options
author | mchlrhw <4028654+mchlrhw@users.noreply.github.com> | 2017-09-06 17:33:55 +0100 |
---|---|---|
committer | mchlrhw <4028654+mchlrhw@users.noreply.github.com> | 2017-09-06 17:34:19 +0100 |
commit | bb79e37797eef027c2a4534a450e2f9d5eafb28e (patch) | |
tree | 048942defeabac989c46cbd87041ee288df8c25c /src/codegen/mod.rs | |
parent | e96906f7f24e9b26cfb996223a435cab391351f1 (diff) |
Check derive_copy option
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index f47787af..4697ba21 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -1493,7 +1493,9 @@ impl CodeGenerator for CompInfo { needs_default_impl = ctx.options().derive_default; } - if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() { + if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() && + ctx.options().derive_copy + { derives.push("Copy"); if used_template_params.is_some() { // FIXME: This requires extra logic if you have a big array in a |