rust/tests/ui/unsafe-fields
Jack Wrenn 91034adf30 Do not require that unsafe fields lack drop glue
Instead, we adopt the position that introducing an `unsafe` field
itself carries a safety invariant: that if you assign an invariant
to that field weaker than what the field's destructor requires,
you must ensure that field is in a droppable state in your
destructor.

See:
- https://github.com/rust-lang/rfcs/pull/3458#discussion_r1971676100
- https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/unsafe.20fields.20RFC/near/502113897
2025-02-28 16:32:06 +00:00
..
auxiliary do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
auto-traits.current.stderr do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
auto-traits.next.stderr do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
auto-traits.rs do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
copy-trait.rs Make Copy unsafe to implement for ADTs with unsafe fields 2024-12-07 20:50:00 +00:00
copy-trait.stderr Make Copy unsafe to implement for ADTs with unsafe fields 2024-12-07 20:50:00 +00:00
unsafe-fields-crate.rs do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
unsafe-fields-crate.stderr do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
unsafe-fields-parse.rs do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
unsafe-fields-parse.stderr do not implement unsafe auto traits for types with unsafe fields 2024-12-05 23:52:21 +00:00
unsafe-fields.rs Do not require that unsafe fields lack drop glue 2025-02-28 16:32:06 +00:00
unsafe-fields.stderr Do not require that unsafe fields lack drop glue 2025-02-28 16:32:06 +00:00