]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #52502 - RalfJung:rotate, r=scottmcm
authorkennytm <kennytm@gmail.com>
Fri, 20 Jul 2018 18:59:04 +0000 (02:59 +0800)
committerkennytm <kennytm@gmail.com>
Fri, 20 Jul 2018 20:08:05 +0000 (04:08 +0800)
fix unsafety: don't call ptr_rotate for ZST

`rotate::ptr_rotate` has a comment saying
```
/// # Safety
///
/// The specified range must be valid for reading and writing.
/// The type `T` must have non-zero size.
```
So we better make sure we don't call it on ZST...

Cc @scottmcm (author of https://github.com/rust-lang/rust/pull/41670)


Trivial merge