Skip to content

Commit bb79e37

Browse files
committed
Check derive_copy option
1 parent e96906f commit bb79e37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/codegen/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,9 @@ impl CodeGenerator for CompInfo {
14931493
needs_default_impl = ctx.options().derive_default;
14941494
}
14951495

1496-
if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() {
1496+
if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() &&
1497+
ctx.options().derive_copy
1498+
{
14971499
derives.push("Copy");
14981500
if used_template_params.is_some() {
14991501
// FIXME: This requires extra logic if you have a big array in a

0 commit comments

Comments
 (0)