diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2014-11-14 15:14:52 -0800 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-02-12 13:55:08 +0100 |
| commit | 32d0dbd49a372b9d2e000587497de6ffca9e1cca (patch) | |
| tree | 4bcd232997be2f001ab5f26a9dda894c36936d2c /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 0fdca30fcb2303966ad2529b7a3b0599088c105d (diff) | |
| download | rust-32d0dbd49a372b9d2e000587497de6ffca9e1cca.tar.gz rust-32d0dbd49a372b9d2e000587497de6ffca9e1cca.zip | |
librustc: Forbid partial reinitialization of uninitialized structures or
enumerations that implement the `Drop` trait.
This breaks code like:
struct Struct {
f: String,
g: String,
}
impl Drop for Struct { ... }
fn main() {
let x = Struct { ... };
drop(x);
x.f = ...;
}
Change this code to not create partially-initialized structures. For
example:
struct Struct {
f: String,
g: String,
}
impl Drop for Struct { ... }
fn main() {
let x = Struct { ... };
drop(x);
x = Struct {
f: ...,
g: ...,
}
}
Closes #18571.
[breaking-change]
----
(Joint authorship by pcwalton and Ryman; thanks all!)
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
