Skip to content

Commit

Permalink
Test fixes and rebase conflicts from rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Oct 27, 2014
1 parent 40811f8 commit a33d761
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/libcollections/vec.rs
Expand Up @@ -231,7 +231,7 @@ impl<T> Vec<T> {
/// }
///
/// // Put everything back together into a Vec
/// let rebuilt = Vec::from_raw_parts(len, cap, p);
/// let rebuilt = Vec::from_raw_parts(p, len, cap);
/// assert_eq!(rebuilt, vec![4i, 5i, 6i]);
/// }
/// }
Expand Down
12 changes: 6 additions & 6 deletions src/libstd/ascii.rs
Expand Up @@ -259,9 +259,9 @@ impl OwnedAsciiCast for Vec<u8> {

#[inline]
unsafe fn into_ascii_nocheck(self) -> Vec<Ascii> {
let v = Vec::from_raw_parts(self.len(),
self.capacity(),
mem::transmute(self.as_ptr()));
let v = Vec::from_raw_parts(self.as_ptr() as *mut Ascii,
self.len(),
self.capacity());

// We forget `self` to avoid freeing it at the end of the scope
// Otherwise, the returned `Vec` would point to freed memory
Expand Down Expand Up @@ -345,9 +345,9 @@ pub trait IntoBytes {
impl IntoBytes for Vec<Ascii> {
fn into_bytes(self) -> Vec<u8> {
unsafe {
let v = Vec::from_raw_parts(self.len(),
self.capacity(),
mem::transmute(self.as_ptr()));
let v = Vec::from_raw_parts(self.as_ptr() as *mut u8,
self.len(),
self.capacity());

// We forget `self` to avoid freeing it at the end of the scope
// Otherwise, the returned `Vec` would point to freed memory
Expand Down
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

static X: uint = 0 as *const uint as uint;
//~^ ERROR: can not cast a pointer to an integer in a constant expression

fn main() {
assert_eq!(X, 0);
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-16668.rs
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-pretty

#![feature(unboxed_closures)]

struct Parser<'a, I, O> {
Expand Down

0 comments on commit a33d761

Please sign in to comment.