diff options
| author | bors <bors@rust-lang.org> | 2015-10-10 00:39:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-10-10 00:39:29 +0000 |
| commit | 87cd2c08273dec5c8db8e59f4231b8e69aa9b85b (patch) | |
| tree | 24c7c70c06fbcd88be686bcf4e11d5ffc10aa27c /src/doc/reference.md | |
| parent | 439311d9382abd5d22c9068f3f158d3b9ef6d1c9 (diff) | |
| parent | a445f234a64cdbbf946af012b94dccf91447b5ff (diff) | |
| download | rust-87cd2c08273dec5c8db8e59f4231b8e69aa9b85b.tar.gz rust-87cd2c08273dec5c8db8e59f4231b8e69aa9b85b.zip | |
Auto merge of #28861 - pnkfelix:fsk-nonparam-dropck-issue28498, r=arielb1
implement RFC 1238: nonparametric dropck. cc #28498 cc @nikomatsakis
Diffstat (limited to 'src/doc/reference.md')
| -rw-r--r-- | src/doc/reference.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index c85b7973ee7..ac0fbea8ad8 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1929,6 +1929,20 @@ macro scope. - `simd` - on certain tuple structs, derive the arithmetic operators, which lower to the target's SIMD instructions, if any; the `simd` feature gate is necessary to use this attribute. +- `unsafe_destructor_blind_to_params` - on `Drop::drop` method, asserts that the + destructor code (and all potential specializations of that code) will + never attempt to read from nor write to any references with lifetimes + that come in via generic parameters. This is a constraint we cannot + currently express via the type system, and therefore we rely on the + programmer to assert that it holds. Adding this to a Drop impl causes + the associated destructor to be considered "uninteresting" by the + Drop-Check rule, and thus it can help sidestep data ordering + constraints that would otherwise be introduced by the Drop-Check + rule. Such sidestepping of the constraints, if done incorrectly, can + lead to undefined behavior (in the form of reading or writing to data + outside of its dynamic extent), and thus this attribute has the word + "unsafe" in its name. To use this, the + `unsafe_destructor_blind_to_params` feature gate must be enabled. - `unsafe_no_drop_flag` - on structs, remove the flag that prevents destructors from being run twice. Destructors might be run multiple times on the same object with this attribute. To use this, the `unsafe_no_drop_flag` feature |
