Skip to content

Commit 487fa95

Browse files
committed
Test fixes from the rollup
1 parent 57e0908 commit 487fa95

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

src/libstd/rt/global_heap.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ pub unsafe fn realloc_raw(ptr: *mut u8, size: uint) -> *mut u8 {
6464
}
6565
}
6666

67-
// The compiler never calls `exchange_free` on ~ZeroSizeType, so zero-size
68-
// allocations can point to this `static`. It would be incorrect to use a null
69-
// pointer, due to enums assuming types like unique pointers are never null.
70-
static EMPTY: () = ();
71-
7267
/// The allocator for unique pointers without contained managed pointers.
7368
#[cfg(not(test))]
7469
#[lang="exchange_malloc"]
7570
#[inline]
7671
pub unsafe fn exchange_malloc(size: uint) -> *mut u8 {
72+
// The compiler never calls `exchange_free` on ~ZeroSizeType, so zero-size
73+
// allocations can point to this `static`. It would be incorrect to use a null
74+
// pointer, due to enums assuming types like unique pointers are never null.
75+
static EMPTY: () = ();
76+
7777
if size == 0 {
7878
&EMPTY as *() as *mut u8
7979
} else {

src/libsyntax/abi.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ fn indices_are_correct() {
193193

194194
#[test]
195195
fn pick_uniplatform() {
196-
assert_eq!(Stdcall.for_arch(OsLinux, X86), Some(Stdcall));
197-
assert_eq!(Stdcall.for_arch(OsLinux, Arm), None);
198-
assert_eq!(System.for_arch(OsLinux, X86), Some(C));
199-
assert_eq!(System.for_arch(OsWin32, X86), Some(Stdcall));
200-
assert_eq!(System.for_arch(OsWin32, X86_64), Some(C));
201-
assert_eq!(System.for_arch(OsWin32, Arm), Some(C));
202-
assert_eq!(Stdcall.for_arch(OsWin32, X86), Some(Stdcall));
203-
assert_eq!(Stdcall.for_arch(OsWin32, X86_64), Some(Stdcall));
196+
assert_eq!(Stdcall.for_target(OsLinux, X86), Some(Stdcall));
197+
assert_eq!(Stdcall.for_target(OsLinux, Arm), None);
198+
assert_eq!(System.for_target(OsLinux, X86), Some(C));
199+
assert_eq!(System.for_target(OsWin32, X86), Some(Stdcall));
200+
assert_eq!(System.for_target(OsWin32, X86_64), Some(C));
201+
assert_eq!(System.for_target(OsWin32, Arm), Some(C));
202+
assert_eq!(Stdcall.for_target(OsWin32, X86), Some(Stdcall));
203+
assert_eq!(Stdcall.for_target(OsWin32, X86_64), Some(Stdcall));
204204
}

src/test/bench/rt-spawn-rate.rs

+10
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,23 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![no_start]
12+
13+
extern crate green;
14+
extern crate rustuv;
15+
1116
use std::task::spawn;
1217
use std::os;
1318
use std::uint;
1419

1520
// Very simple spawn rate test. Spawn N tasks that do nothing and
1621
// return.
1722

23+
#[start]
24+
fn start(argc: int, argv: **u8) -> int {
25+
green::start(argc, argv, rustuv::event_loop, main)
26+
}
27+
1828
fn main() {
1929

2030
let args = os::args();

0 commit comments

Comments
 (0)