Test fixes and rebase conflicts

This commit is contained in:
Alex Crichton 2015-01-21 09:23:27 -08:00
parent 9c999c797c
commit 4ffde0814f
11 changed files with 7 additions and 42 deletions

View File

@ -280,7 +280,7 @@ mod imp {
if align <= MIN_ALIGN {
libc::malloc(size as libc::size_t) as *mut u8
} else {
let mut out = ptr::null();
let mut out = ptr::null_mut();
let ret = posix_memalign(&mut out,
align as libc::size_t,
size as libc::size_t);

View File

@ -75,7 +75,7 @@ use mem::transmute;
use option::Option::{self, Some, None};
use raw::TraitObject;
use intrinsics;
#[cfg(not(stage0))] use marker::Sized;
use marker::Sized;
///////////////////////////////////////////////////////////////////////////////
// Any trait
@ -175,17 +175,10 @@ pub struct TypeId {
impl TypeId {
/// Returns the `TypeId` of the type this generic function has been
/// instantiated with
#[cfg(not(stage0))]
#[unstable = "may grow a `Reflect` bound soon via marker traits"]
pub fn of<T: ?Sized + 'static>() -> TypeId {
TypeId {
t: unsafe { intrinsics::type_id::<T>() },
}
}
/// dox
#[cfg(stage0)]
pub fn of<T: 'static>() -> TypeId {
unsafe { intrinsics::type_id::<T>() }
}
}

View File

@ -44,8 +44,6 @@
use marker::Sized;
#[cfg(stage0)] use any::TypeId;
pub type GlueFn = extern "Rust" fn(*const i8);
#[lang="ty_desc"]
@ -208,12 +206,8 @@ extern "rust-intrinsic" {
/// Gets an identifier which is globally unique to the specified type. This
/// function will return the same value for a type regardless of whichever
/// crate it is invoked in.
#[cfg(not(stage0))]
pub fn type_id<T: ?Sized + 'static>() -> u64;
#[cfg(stage0)]
pub fn type_id<T: ?Sized + 'static>() -> TypeId;
/// Create a value initialized to zero.
///
/// `init` is unsafe because it returns a zeroed-out datum,

View File

@ -2088,7 +2088,7 @@ impl Clean<Mutability> for ast::Mutability {
}
}
#[derive(Show, Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Show)]
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Copy, Show)]
pub enum ImplPolarity {
Positive,
Negative,

View File

@ -1444,7 +1444,7 @@ pub trait Buffer: Reader {
}
}
};
buffer.consume(used);
self.consume(used);
if done {
return Ok(res);
}

View File

@ -319,8 +319,6 @@ use prelude::v1::*;
use sync::Arc;
use fmt;
#[cfg(stage0)] // NOTE remove use after next snapshot
use marker;
use mem;
use cell::UnsafeCell;

View File

@ -31,6 +31,7 @@ use mem;
use ops::Drop;
use option::Option::{Some, None};
use path::Path;
use ptr;
use result::Result::{Ok, Err};
use slice::SliceExt;
use str::{self, StrExt};

View File

@ -13,6 +13,7 @@ use prelude::v1::*;
use libc::types::os::arch::extra::{DWORD, LPVOID, BOOL};
use mem;
use ptr;
use rt;
use sys_common::mutex::{MUTEX_INIT, Mutex};

View File

@ -459,6 +459,7 @@ mod imp {
use cell::UnsafeCell;
use mem;
use ptr;
use sys_common::thread_local::StaticKey as OsStaticKey;
#[doc(hidden)]

View File

@ -1,7 +0,0 @@
-include ../tools.mk
all:
# Running all the shards should hit every test
$(RUSTC) --test main.rs
$(call RUN,main) --test-shard 1.2 | grep "test_1 ... ok"
$(call RUN,main) --test-shard 2.2 | grep "test_2 ... ok"

View File

@ -1,16 +0,0 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "lib"]
#[test]
fn test_1() { }
#[test]
fn test_2() { }