about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.rs
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-10 10:04:39 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-26 14:08:54 +0100
commit3902190ac4d64962b2c1ac9a6ae88777b7112f82 (patch)
tree61759f62fbca6a1e9c25e3e95dd1d957340510df /src/test/codegen/stack-alloc-string-slice.rs
parent1501f33e76f6f9621aa08fb0cbbc5f85a5ac7f0f (diff)
downloadrust-3902190ac4d64962b2c1ac9a6ae88777b7112f82.tar.gz
rust-3902190ac4d64962b2c1ac9a6ae88777b7112f82.zip
Switch drop-flag to `u8` to allow special tags to instrument state.
Refactored code so that the drop-flag values for initialized
(`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names.

Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the
same as `mem::zeroed`, but the point is that it abstracts away from
the particular choice of value for `DTOR_DONE`).

Filling-drop needs to use something other than `ptr::read_and_zero`,
so I added such a function: `ptr::read_and_drop`.  But, libraries
should not use it if they can otherwise avoid it.

Fixes to tests to accommodate filling-drop.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.rs')
0 files changed, 0 insertions, 0 deletions