about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-11 04:55:41 +0000
committerbors <bors@rust-lang.org>2014-09-11 04:55:41 +0000
commit1f4117f5182249d91c52cc3e384e4577356e1634 (patch)
treecfa16e82923ad5048b2bc770296e8b0be6585945 /src/rustllvm/PassWrapper.cpp
parent7ea660e678434dc1eea2a3b60bf3bc92c8404745 (diff)
parent9639cafd3625429ea558d3202cffdfc851fcf9cf (diff)
downloadrust-1f4117f5182249d91c52cc3e384e4577356e1634.tar.gz
rust-1f4117f5182249d91c52cc3e384e4577356e1634.zip
auto merge of #17110 : thestinger/rust/dst, r=cmr
The pointer in the slice must not be null, because enum representations
make that assumption. The `exchange_malloc` function returns a non-null
sentinel for the zero size case, and it must not be passed to the
`exchange_free` lang item.

Since the length is always equal to the true capacity, a branch on the
length is enough for most types. Slices of zero size types are
statically special cased to never attempt deallocation. This is the same
implementation as `Vec<T>`.

Closes #14395
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions