Skip to content

Commit d09bb00

Browse files
committed
Test fixes and rebase conflicts
1 parent 67d1388 commit d09bb00

File tree

10 files changed

+19
-16
lines changed

10 files changed

+19
-16
lines changed

src/liballoc/arc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ mod tests {
600600
use std::option::Option::{Some, None};
601601
use std::str::Str;
602602
use std::sync::atomic;
603+
use std::sync::atomic::Ordering::{Acquire, SeqCst};
603604
use std::task;
604605
use std::kinds::Send;
605606
use std::vec::Vec;

src/libcollections/btree/node.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,9 @@ impl<K, V> Node<K, V> {
304304
let (vals_offset, _) = calculate_offsets_generic::<K, V>(capacity, true);
305305

306306
Node {
307-
keys: Unique(buffer as *mut K).
307+
keys: Unique(buffer as *mut K),
308308
vals: Unique(unsafe { buffer.offset(vals_offset as int) as *mut V }),
309-
edges: Unique(ptr::null_mut::<u8>()),
309+
edges: Unique(ptr::null_mut()),
310310
_len: 0,
311311
_capacity: capacity,
312312
}
@@ -574,7 +574,7 @@ impl <K, V> Node<K, V> {
574574

575575
/// If the node has any children
576576
pub fn is_leaf(&self) -> bool {
577-
self.edges.is_null()
577+
self.edges.0.is_null()
578578
}
579579

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

1061-
ptr: self.keys as *mut u8,
1061+
ptr: self.keys.0 as *mut u8,
10621062
capacity: self.capacity(),
10631063
is_leaf: self.is_leaf()
10641064
},

src/libcollections/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,11 @@ impl<T: Clone> ToOwned<Vec<T>> for [T] {
11021102
// Iterators
11031103
////////////////////////////////////////////////////////////////////////////////
11041104

1105-
#[deriving(Copy)]
1105+
#[deriving(Copy, Clone)]
11061106
enum Direction { Pos, Neg }
11071107

11081108
/// An `Index` and `Direction` together.
1109-
#[deriving(Copy)]
1109+
#[deriving(Copy, Clone)]
11101110
struct SizeDirection {
11111111
size: uint,
11121112
dir: Direction,

src/libcoretest/atomic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
use core::atomic::*;
12+
use core::atomic::Ordering::SeqCst;
1213

1314
#[test]
1415
fn bool_() {

src/librustc_back/sha2.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,12 @@ static H256: [u32, ..8] = [
530530
mod tests {
531531
extern crate rand;
532532

533-
use super::{Digest, Sha256, FixedBuffer};
534-
use self::rand::isaac::IsaacRng;
535533
use self::rand::Rng;
534+
use self::rand::isaac::IsaacRng;
536535
use serialize::hex::FromHex;
536+
use std::iter::random;
537537
use std::num::Int;
538+
use super::{Digest, Sha256, FixedBuffer};
538539

539540
// A normal addition - no overflow occurs
540541
#[test]

src/libstd/collections/hash/map.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1320,9 +1320,9 @@ pub struct Iter<'a, K: 'a, V: 'a> {
13201320
}
13211321

13221322
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
1323-
impl<'a, K, V> Clone for Entries<'a, K, V> {
1324-
fn clone(&self) -> Entries<'a, K, V> {
1325-
Entries {
1323+
impl<'a, K, V> Clone for Iter<'a, K, V> {
1324+
fn clone(&self) -> Iter<'a, K, V> {
1325+
Iter {
13261326
inner: self.inner.clone()
13271327
}
13281328
}

src/libstd/collections/hash/table.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,9 @@ pub struct Iter<'a, K: 'a, V: 'a> {
788788
}
789789

790790
// FIXME(#19839) Remove in favor of `#[deriving(Clone)]`
791-
impl<'a, K, V> Clone for Entries<'a, K, V> {
792-
fn clone(&self) -> Entries<'a, K, V> {
793-
Entries {
791+
impl<'a, K, V> Clone for Iter<'a, K, V> {
792+
fn clone(&self) -> Iter<'a, K, V> {
793+
Iter {
794794
iter: self.iter.clone(),
795795
elems_left: self.elems_left
796796
}

src/libstd/os.rs

+1
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ fn real_args() -> Vec<String> {
716716
#[cfg(windows)]
717717
fn real_args() -> Vec<String> {
718718
use slice;
719+
use iter::range;
719720

720721
let mut nArgs: c_int = 0;
721722
let lpArgCount: *mut c_int = &mut nArgs;

src/libstd/sys/windows/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn fill_utf16_buf_and_decode(f: |*mut u16, DWORD| -> DWORD) -> Option<String
129129
let mut res = None;
130130
let mut done = false;
131131
while !done {
132-
let mut buf: Vec<u16> = repeat(0u16).take(n).collect();
132+
let mut buf: Vec<u16> = repeat(0u16).take(n as uint).collect();
133133
let k = f(buf.as_mut_ptr(), n);
134134
if k == (0 as DWORD) {
135135
done = true;

src/test/compile-fail/trait-object-safety.rs

-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,4 @@ impl Tr for St {
2222

2323
fn main() {
2424
let _: &Tr = &St; //~ ERROR cannot convert to a trait object because trait `Tr` is not
25-
//~^ NOTE cannot call a static method (`foo`) through a trait object
2625
}

0 commit comments

Comments
 (0)