Skip to content

Commit

Permalink
Test fixes and rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Dec 31, 2014
1 parent 67d1388 commit 582cba1
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ mod tests {
use std::option::Option::{Some, None};
use std::str::Str;
use std::sync::atomic;
use std::sync::atomic::Ordering::{Acquire, SeqCst};
use std::task;
use std::kinds::Send;
use std::vec::Vec;
Expand Down
8 changes: 4 additions & 4 deletions src/libcollections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ impl<K, V> Node<K, V> {
let (vals_offset, _) = calculate_offsets_generic::<K, V>(capacity, true);

Node {
keys: Unique(buffer as *mut K).
keys: Unique(buffer as *mut K),
vals: Unique(unsafe { buffer.offset(vals_offset as int) as *mut V }),
edges: Unique(ptr::null_mut::<u8>()),
edges: Unique(ptr::null_mut()),
_len: 0,
_capacity: capacity,
}
Expand Down Expand Up @@ -574,7 +574,7 @@ impl <K, V> Node<K, V> {

/// If the node has any children
pub fn is_leaf(&self) -> bool {
self.edges.is_null()
self.edges.0.is_null()
}

/// if the node has too few elements
Expand Down Expand Up @@ -1058,7 +1058,7 @@ impl<K, V> Node<K, V> {
vals: RawItems::from_slice(self.vals()),
edges: RawItems::from_slice(self.edges()),

ptr: self.keys as *mut u8,
ptr: self.keys.0 as *mut u8,
capacity: self.capacity(),
is_leaf: self.is_leaf()
},
Expand Down
4 changes: 2 additions & 2 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,11 @@ impl<T: Clone> ToOwned<Vec<T>> for [T] {
// Iterators
////////////////////////////////////////////////////////////////////////////////

#[deriving(Copy)]
#[deriving(Copy, Clone)]
enum Direction { Pos, Neg }

/// An `Index` and `Direction` together.
#[deriving(Copy)]
#[deriving(Copy, Clone)]
struct SizeDirection {
size: uint,
dir: Direction,
Expand Down
1 change: 1 addition & 0 deletions src/libcoretest/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// except according to those terms.

use core::atomic::*;
use core::atomic::Ordering::SeqCst;

#[test]
fn bool_() {
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_back/sha2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,11 +530,12 @@ static H256: [u32, ..8] = [
mod tests {
extern crate rand;

use super::{Digest, Sha256, FixedBuffer};
use self::rand::isaac::IsaacRng;
use self::rand::Rng;
use self::rand::isaac::IsaacRng;
use serialize::hex::FromHex;
use std::iter::repeat;
use std::num::Int;
use super::{Digest, Sha256, FixedBuffer};

// A normal addition - no overflow occurs
#[test]
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,9 +1320,9 @@ pub struct Iter<'a, K: 'a, V: 'a> {
}

// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
impl<'a, K, V> Clone for Entries<'a, K, V> {
fn clone(&self) -> Entries<'a, K, V> {
Entries {
impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> {
Iter {
inner: self.inner.clone()
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/collections/hash/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ pub struct Iter<'a, K: 'a, V: 'a> {
}

// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
impl<'a, K, V> Clone for Entries<'a, K, V> {
fn clone(&self) -> Entries<'a, K, V> {
Entries {
impl<'a, K, V> Clone for Iter<'a, K, V> {
fn clone(&self) -> Iter<'a, K, V> {
Iter {
iter: self.iter.clone(),
elems_left: self.elems_left
}
Expand Down
1 change: 1 addition & 0 deletions src/libstd/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ fn real_args() -> Vec<String> {
#[cfg(windows)]
fn real_args() -> Vec<String> {
use slice;
use iter::range;

let mut nArgs: c_int = 0;
let lpArgCount: *mut c_int = &mut nArgs;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn fill_utf16_buf_and_decode(f: |*mut u16, DWORD| -> DWORD) -> Option<String
let mut res = None;
let mut done = false;
while !done {
let mut buf: Vec<u16> = repeat(0u16).take(n).collect();
let mut buf: Vec<u16> = repeat(0u16).take(n as uint).collect();
let k = f(buf.as_mut_ptr(), n);
if k == (0 as DWORD) {
done = true;
Expand Down
1 change: 0 additions & 1 deletion src/test/compile-fail/trait-object-safety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ impl Tr for St {

fn main() {
let _: &Tr = &St; //~ ERROR cannot convert to a trait object because trait `Tr` is not
//~^ NOTE cannot call a static method (`foo`) through a trait object
}
3 changes: 2 additions & 1 deletion src/test/run-pass/issue-12684.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
// except according to those terms.

use std::time::Duration;
use std::thread::Thread;

fn main() {
std::task::spawn(move|| customtask());
Thread::spawn(move|| customtask()).join().ok().unwrap();
}

fn customtask() {
Expand Down

0 comments on commit 582cba1

Please sign in to comment.