diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-05-05 17:35:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-05 17:35:24 -0400 |
| commit | 6ace8a76cb69ba7f8fd0ad055ddf85658ddcbbd2 (patch) | |
| tree | cbc11dfc2fae55ee4d7a909ee6e5479b4739ab5f /src/librustc_data_structures/array_vec.rs | |
| parent | 302dfd6c9d14ef9cd3140aed6ab9a65d6a0a1a51 (diff) | |
| parent | e8234e0e4756995dab0c095a2dfcee35908f4a3d (diff) | |
| download | rust-6ace8a76cb69ba7f8fd0ad055ddf85658ddcbbd2.tar.gz rust-6ace8a76cb69ba7f8fd0ad055ddf85658ddcbbd2.zip | |
Rollup merge of #41064 - Gankro:ptr-redux, r=alexcrichton
refactor NonZero, Shared, and Unique APIs Major difference is that I removed Deref impls, as apparently LLVM has trouble maintaining metadata with a `&ptr -> &ptr` API. This was cited as a blocker for ever stabilizing this API. It wasn't that ergonomic anyway. * Added `get` to NonZero to replace Deref impl * Added `ptr` getter to Shared/Unique to replace Deref impl * Added Unique's `get` and `get_mut` conveniences to Shared * Deprecated `as_mut_ptr` on Shared in favour of `ptr` Note that Shared used to primarily expose only `*const` but there isn't a good justification for that, so I made it `*mut`.
Diffstat (limited to 'src/librustc_data_structures/array_vec.rs')
| -rw-r--r-- | src/librustc_data_structures/array_vec.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_data_structures/array_vec.rs b/src/librustc_data_structures/array_vec.rs index 848e5a076bb..078bb801751 100644 --- a/src/librustc_data_structures/array_vec.rs +++ b/src/librustc_data_structures/array_vec.rs @@ -255,7 +255,7 @@ impl<'a, A: Array> Drop for Drain<'a, A> { if self.tail_len > 0 { unsafe { - let source_array_vec = &mut *self.array_vec.as_mut_ptr(); + let source_array_vec = self.array_vec.as_mut(); // memmove back untouched tail, update to new length let start = source_array_vec.len(); let tail = self.tail_start; |
