Skip to content

Commit

Permalink
Apply suggestions from RalfJung
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 14, 2025
1 parent c63cdbc commit 0c98fb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ let x = (&temp()).use_temp(); // ERROR
r[destructors.forget]
## Not running destructors

r[destructors.manually-preventing]
### Manually preventing destructors
r[destructors.manually-suppressing]
### Manually suppressing destructors

[`std::mem::forget`] can be used to prevent the destructor of a variable from being run,
and [`std::mem::ManuallyDrop`] provides a wrapper to prevent a
Expand Down
7 changes: 4 additions & 3 deletions src/linkage.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ Passing `rlib`s directly into your foreign linker is currently unsupported.
r[link.unwinding]
### Prohibited linkage and unwinding

r[link.unwinding.consistency]
r[link.unwinding.intro]
If you are *not* using `rustc` to link Rust files, you must take care to ensure that unwinding is
handled consistently across the entire binary. This includes using `dlopen` or similar facilities
where linking is done by the system runtime without `rustc` being involved.
handled consistently across the entire binary. Linking without `rustc` includes using `dlopen` or similar facilities
where linking is done by the system runtime without `rustc` being involved. In the following,
we define what exactly is meant by "handling unwinding consistently".

r[link.unwinding.potential]
A Rust artifact is called *potentially unwinding* if any of the following conditions is met:
Expand Down

0 comments on commit 0c98fb1

Please sign in to comment.