diff --git a/sway-core/src/type_system/ast_elements/binding.rs b/sway-core/src/type_system/ast_elements/binding.rs index ddba2260ff1..7ae44386f85 100644 --- a/sway-core/src/type_system/ast_elements/binding.rs +++ b/sway-core/src/type_system/ast_elements/binding.rs @@ -311,10 +311,7 @@ impl TypeCheckTypeBinding for TypeBinding { )?; // Insert the new copy into the declaration engine. let new_struct_ref = ctx.engines.de().insert(new_copy); - // Take any trait items that apply to the old type and copy them to the new type. let type_id = type_engine.insert(engines, TypeInfo::Struct(new_struct_ref.clone())); - ctx.namespace - .insert_trait_implementation_for_type(engines, type_id); Ok((new_struct_ref, Some(type_id), None)) } } @@ -364,10 +361,7 @@ impl TypeCheckTypeBinding for TypeBinding { )?; // Insert the new copy into the declaration engine. let new_enum_ref = ctx.engines.de().insert(new_copy); - // Take any trait items that apply to the old type and copy them to the new type. let type_id = type_engine.insert(engines, TypeInfo::Enum(new_enum_ref.clone())); - ctx.namespace - .insert_trait_implementation_for_type(engines, type_id); Ok((new_enum_ref, Some(type_id), Some(unknown_decl))) } }