Skip to content

Commit 7ad628a

Browse files
committed
fix: reorder some paragraphs
1 parent e534b0c commit 7ad628a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

text/0000-forget-marker-trait.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ Add a `Forget` marker trait indicating whether it is safe to skip the destructor
1414
# Motivation
1515
[motivation]: #motivation
1616

17-
Many Rust programmers may find the biggest problem with `Forget` to be migration. But this RFC describes how migration can be done easily. See [#migration](#migration) section for details.
17+
Back in 2015, the [decision was made][safe-mem-forget] to make `mem::forget` safe, making every type effectively implement `Forget`. All the APIs in `std` were able remain safe after this change, except one. This RFC is not targeted at resource leaks in general, but is instead focused on allowing a number of APIs to become safe, by providing new unsafe guarantees using `Forget`.
1818

1919
In short, the lack of `!Forget` types undermines lifetimes, sacrificing all 3 of performance, ergonomics and efficiency. Most Rust code, as well as external APIs, naturally converge towards `!Forget` types, but in the absence of `Forget` trait support, those APIs use a mixture of `Arc`, `'static`, allocations, etc.
2020

21-
---
22-
23-
Back in 2015, the [decision was made][safe-mem-forget] to make `mem::forget` safe, making every type effectively implement `Forget`. All the APIs in `std` were able remain safe after this change, except one. This RFC is not targeted at resource leaks in general, but is instead focused on allowing a number of APIs to become safe, by providing new unsafe guarantees using `Forget`.
21+
Many Rust programmers may find the biggest problem with `Forget` to be migration. But this RFC describes how migration can be done easily. See [#migration](#migration) section for details.
2422

2523
[safe-mem-forget]: https://github.com/rust-lang/rfcs/pull/1066
2624

0 commit comments

Comments
 (0)