-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
const Drop can be implemented for structs with non-const-Drop fields #155618
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`PG-const-traitsProject group: Const traitsProject group: Const traits
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)C-bugCategory: This is a bug.Category: This is a bug.F-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`PG-const-traitsProject group: Const traitsProject group: Const traits
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=5108e4d09698e21cbb974237f91ba456
I expected to see this happen: compilation error, apparently this is not supposed to happen.
Instead, this happened: compiles fine.
Meta
rustc --version --verbose: (Playground)@oli-obk