about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-26 06:18:17 +0000
committerbors <bors@rust-lang.org>2017-04-26 06:18:17 +0000
commitdad9814eb0964a92494fef9ce23b80353dc14c46 (patch)
tree4d2fa1e7f6cbdf2c7606bceea1cc8c09a6660239 /src/rustllvm/PassWrapper.cpp
parent4512424391768cfad54efb8ccdb1191f61e338c2 (diff)
parentc66c6e96978cd81130587e9f4d1fa52dc1b183d6 (diff)
downloadrust-dad9814eb0964a92494fef9ce23b80353dc14c46.tar.gz
rust-dad9814eb0964a92494fef9ce23b80353dc14c46.zip
Auto merge of #41258 - clarcharr:str_box_extras, r=Kimundi
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes)

This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses.

What's added:

* `From<Box<str>> for Box<[u8]>`
* `<Box<str>>::into_boxed_bytes` (just calls `Into::into`)
* `alloc::str` (new module)
* `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str`
* exports `from_utf8_mut` in `collections::str` (missed from previous PR)
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions