about summary refs log tree commit diff
path: root/src/test/codegen/stack-alloc-string-slice.rs
diff options
context:
space:
mode:
authorKevin Ballard <kevin@sb.org>2015-05-11 00:55:21 -0700
committerKevin Ballard <kevin@sb.org>2015-05-11 01:16:09 -0700
commit52efe55d0425d963ee949be96e36d584a603a455 (patch)
treef3cef7424da5bcd5a48c7eecaafdcce593c5ebd4 /src/test/codegen/stack-alloc-string-slice.rs
parent73345185793cca8a0b4c77aa87973a2634a0c492 (diff)
downloadrust-52efe55d0425d963ee949be96e36d584a603a455.tar.gz
rust-52efe55d0425d963ee949be96e36d584a603a455.zip
Handle overflow properly in core::slice
core::slice was originally written to tolerate overflow (notably, with
slices of zero-sized elements), but it was never updated to use wrapping
arithmetic when overflow traps were added.

Also correctly handle the case of calling .nth() on an Iter with a
zero-sized element type. The iterator was assuming that the pointer
value of the returned reference was meaningful, but that's not true for
zero-sized elements.

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