Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually Drop #1860

Merged
merged 8 commits into from
Mar 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions text/0000-manually-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<T> ManuallyDrop<T> {
// Other common impls such as `Debug for T: Debug`.
```

Let us apply this structure to the example from the motivation:
Let us apply this union to the example from the motivation:

```rust
struct FruitBox {
Expand All @@ -127,18 +127,18 @@ impl Drop for FruitBox {
}
```

It is proposed that such code would become idiomatic for structures where fields must be dropped in
a particular order.
It is proposed that such pattern would become idiomatic for structures where fields must be dropped
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps: "this pattern" instead of "such pattern"? Alternates would be "such patterns" and "such a pattern", but "this" seems more natural here.

in a particular order.

# How We Teach This
[how-we-teach-this]: #how-we-teach-this

It is expected that the functions and wrapper added as a result of this RFC would be seldom
necessary.

In addition to the usual API documentation, this structure should be mentioned in
reference/nomicon/elsewhere where drop ordering guarantees are described as a way to explicitly
control the order in which the structure fields gets dropped.
In addition to the usual API documentation, `ManuallyDrop` should be mentioned in
reference/nomicon/elsewhere as the solution to the desire of explicit control of the order in which
the structure fields gets dropped.

<!--
# Drawbacks
Expand Down