From 87a5f0ddf477d1c86ac6e016feefd7ae9c574226 Mon Sep 17 00:00:00 2001 From: Clark Gaebel Date: Fri, 24 Oct 2014 19:31:17 -0700 Subject: Make the Vec data structure layout match raw::Slice. Fixes #18302 r? @thestinger --- src/libsyntax/owned_slice.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/owned_slice.rs b/src/libsyntax/owned_slice.rs index e5c37e5041a..4f09b34557c 100644 --- a/src/libsyntax/owned_slice.rs +++ b/src/libsyntax/owned_slice.rs @@ -74,7 +74,7 @@ impl OwnedSlice { pub fn into_vec(self) -> Vec { // null is ok, because len == 0 in that case, as required by Vec. unsafe { - let ret = Vec::from_raw_parts(self.len, self.len, self.data); + let ret = Vec::from_raw_parts(self.data, self.len, self.len); // the vector owns the allocation now mem::forget(self); ret -- cgit 1.4.1-3-g733a5