Upgrade rust to f93ab64d4a1a7ee91759a1594ab2a426b6cc657e/rustc-1.5.0-dev.

This commit is contained in:
Manish Goregaokar 2015-09-21 13:12:01 +05:30 committed by Ms2ger
parent 8f1469eb08
commit 3c969b346a
40 changed files with 253 additions and 253 deletions

View file

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![cfg_attr(test, feature(box_raw))]
extern crate cookie as cookie_rs;
extern crate flate2;
extern crate hyper;

View file

@ -4,9 +4,12 @@
#![cfg_attr(test, feature(plugin, custom_derive, heap_api))]
#![cfg_attr(test, plugin(plugins))]
extern crate util;
extern crate libc;
#![feature(alloc)]
extern crate alloc;
extern crate euclid;
extern crate libc;
extern crate util;
#[cfg(test)] mod cache;
#[cfg(test)] mod logical_geometry;

View file

@ -34,22 +34,22 @@ fn test_heap_size() {
unsafe {
// EMPTY is the special non-null address used to represent zero-size allocations.
assert_eq!(heap_size_of(::std::rt::heap::EMPTY as *const c_void), 0);
assert_eq!(heap_size_of(::alloc::heap::EMPTY as *const c_void), 0);
// A 64 byte request is allocated exactly.
let x = ::std::rt::heap::allocate(64, 0);
let x = ::alloc::heap::allocate(64, 0);
assert_eq!(heap_size_of(x as *const c_void), 64);
::std::rt::heap::deallocate(x, 64, 0);
::alloc::heap::deallocate(x, 64, 0);
// A 255 byte request is rounded up to 256 bytes.
let x = ::std::rt::heap::allocate(255, 0);
let x = ::alloc::heap::allocate(255, 0);
assert_eq!(heap_size_of(x as *const c_void), 256);
::std::rt::heap::deallocate(x, 255, 0);
::alloc::heap::deallocate(x, 255, 0);
// A 1MiB request is allocated exactly.
let x = ::std::rt::heap::allocate(1024 * 1024, 0);
let x = ::alloc::heap::allocate(1024 * 1024, 0);
assert_eq!(heap_size_of(x as *const c_void), 1024 * 1024);
::std::rt::heap::deallocate(x, 1024 * 1024, 0);
::alloc::heap::deallocate(x, 1024 * 1024, 0);
}
//-----------------------------------------------------------------------