Skip to content

Control over Drop semantics #628

Description

@tomassedovic
Metadata
Point of contact @JayanAXHF
Team(s) compiler, lang, opsem, types
Goal document 2026/manually-drop-attr

Summary

Allow users to easily control the drop semantics of struct fields, letting them change drop order, and disable recursive destructors to make working with cross-language bindings easier.

  • Allow cross-language bindings to expose struct fields without compatibility hazards, and
  • Make all code that disables default destructor behavior more convenient to use in Rust.

Tasks and status


Note: we have updated the body to match the 2026 goal. Your original text is preserved below.

Details

Metadata
Point of contact @thunderseethe
Team(s) compiler, lang, opsem, types
Goal document 2026/manually-drop-attr

Summary

Allow users to easily control the drop semantics of struct fields, letting them change drop order, and disable recursive destructors to make working with cross-language bindings easier.

  • Allow cross-language bindings to expose struct fields without compatibility hazards, and
  • Make all code that disables default destructor behavior more convenient to use in Rust.

Tasks and status

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions