rust/compiler/rustc_hir_analysis
Michael Goulet 1c3733aa69
Rollup merge of #137808 - jswrenn:droppy-unsafe-fields, r=nnethercote
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

Tracking Issue: #132922
2025-03-06 12:22:19 -05:00
..
src Rollup merge of #137808 - jswrenn:droppy-unsafe-fields, r=nnethercote 2025-03-06 12:22:19 -05:00
Cargo.toml Upgrade the compiler to edition 2024 2025-02-22 00:01:48 +00:00
messages.ftl Rollup merge of #137808 - jswrenn:droppy-unsafe-fields, r=nnethercote 2025-03-06 12:22:19 -05:00
README.md rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.