about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/messages.ftl
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-03-06 12:22:19 -0500
committerGitHub <noreply@github.com>2025-03-06 12:22:19 -0500
commit1c3733aa698f53056a7ef72367cc6ed803c84025 (patch)
treee26bdbe45c7790febe300522e82503fe34807aa6 /compiler/rustc_hir_analysis/messages.ftl
parent73d033f5a12e9852d9664286a71e6508b90a6035 (diff)
parent91034adf30b3055e489d59f4483ed5def9cc9f19 (diff)
downloadrust-1c3733aa698f53056a7ef72367cc6ed803c84025.tar.gz
rust-1c3733aa698f53056a7ef72367cc6ed803c84025.zip
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
Diffstat (limited to 'compiler/rustc_hir_analysis/messages.ftl')
-rw-r--r--compiler/rustc_hir_analysis/messages.ftl7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_hir_analysis/messages.ftl b/compiler/rustc_hir_analysis/messages.ftl
index 06c39996a12..935f4de6c58 100644
--- a/compiler/rustc_hir_analysis/messages.ftl
+++ b/compiler/rustc_hir_analysis/messages.ftl
@@ -275,13 +275,6 @@ hir_analysis_invalid_union_field =
 hir_analysis_invalid_union_field_sugg =
     wrap the field type in `ManuallyDrop<...>`
 
-hir_analysis_invalid_unsafe_field =
-    field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be unsafe
-    .note = unsafe fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
-
-hir_analysis_invalid_unsafe_field_sugg =
-    wrap the field type in `ManuallyDrop<...>`
-
 hir_analysis_late_bound_const_in_apit = `impl Trait` can only mention const parameters from an fn or impl
     .label = const parameter declared here