Test fixes and rebase conflicts, round 1

This commit is contained in:
Alex Crichton 2015-03-31 10:26:25 -07:00
parent e3f2d45cb3
commit 94137a37e9
13 changed files with 32 additions and 40 deletions

View file

@ -89,8 +89,6 @@
use core::marker::Sized;
use core::mem::size_of;
use core::mem;
#[cfg(stage0)]
use core::num::wrapping::WrappingOps;
use core::ops::FnMut;
use core::option::Option::{self, Some, None};
use core::ptr;

View file

@ -25,8 +25,6 @@
use core::fmt;
use core::iter::{self, repeat, FromIterator, IntoIterator, RandomAccessIterator};
use core::mem;
#[cfg(stage0)]
use core::num::wrapping::WrappingOps;
use core::ops::{Index, IndexMut};
use core::ptr::{self, Unique};
use core::slice;

View file

@ -21,6 +21,7 @@
#![feature(unicode)]
#![feature(unsafe_destructor)]
#![feature(into_cow)]
#![feature(convert)]
#![cfg_attr(test, feature(str_char))]
#[macro_use] extern crate log;

View file

@ -197,7 +197,6 @@
/// Rust moves to non-zeroing dynamic drop (and thus removes the
/// embedded drop flags that are being established by this
/// intrinsic).
#[cfg(not(stage0))]
pub fn init_dropped<T>() -> T;
/// Create a value initialized to zero.

View file

@ -487,9 +487,5 @@ unsafe impl<'a, T: Send + ?Sized> Send for &'a mut T {}
pub trait Reflect : MarkerTrait {
}
#[cfg(stage0)]
impl<T> Reflect for T { }
#[cfg(not(stage0))]
impl Reflect for .. { }

View file

@ -173,11 +173,6 @@ pub unsafe fn zeroed<T>() -> T {
#[inline]
#[unstable(feature = "filling_drop")]
pub unsafe fn dropped<T>() -> T {
#[cfg(stage0)]
#[inline(always)]
unsafe fn dropped_impl<T>() -> T { zeroed() }
#[cfg(not(stage0))]
#[inline(always)]
unsafe fn dropped_impl<T>() -> T { intrinsics::init_dropped() }
@ -337,38 +332,32 @@ macro_rules! repeat_u8_as_u64 {
// But having the sign bit set is a pain, so 0x1d is probably better.
//
// And of course, 0x00 brings back the old world of zero'ing on drop.
#[cfg(not(stage0))] #[unstable(feature = "filling_drop")]
#[unstable(feature = "filling_drop")]
pub const POST_DROP_U8: u8 = 0x1d;
#[cfg(not(stage0))] #[unstable(feature = "filling_drop")]
#[unstable(feature = "filling_drop")]
pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
#[cfg(not(stage0))] #[unstable(feature = "filling_drop")]
#[unstable(feature = "filling_drop")]
pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
#[cfg(target_pointer_width = "32")]
#[cfg(not(stage0))] #[unstable(feature = "filling_drop")]
#[unstable(feature = "filling_drop")]
pub const POST_DROP_USIZE: usize = POST_DROP_U32 as usize;
#[cfg(target_pointer_width = "64")]
#[cfg(not(stage0))] #[unstable(feature = "filling_drop")]
#[unstable(feature = "filling_drop")]
pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
#[cfg(stage0)] #[unstable(feature = "filling_drop")]
pub const POST_DROP_U8: u8 = 0;
#[cfg(stage0)] #[unstable(feature = "filling_drop")]
pub const POST_DROP_U32: u32 = 0;
#[cfg(stage0)] #[unstable(feature = "filling_drop")]
pub const POST_DROP_U64: u64 = 0;
#[cfg(stage0)] #[unstable(feature = "filling_drop")]
pub const POST_DROP_USIZE: usize = 0;
/// Interprets `src` as `&U`, and then reads `src` without moving the contained value.
/// Interprets `src` as `&U`, and then reads `src` without moving the contained
/// value.
///
/// This function will unsafely assume the pointer `src` is valid for `sizeof(U)` bytes by
/// transmuting `&T` to `&U` and then reading the `&U`. It will also unsafely create a copy of the
/// contained value instead of moving out of `src`.
/// This function will unsafely assume the pointer `src` is valid for
/// `sizeof(U)` bytes by transmuting `&T` to `&U` and then reading the `&U`. It
/// will also unsafely create a copy of the contained value instead of moving
/// out of `src`.
///
/// It is not a compile-time error if `T` and `U` have different sizes, but it is highly encouraged
/// to only invoke this function where `T` and `U` have the same size. This function triggers
/// undefined behavior if `U` is larger than `T`.
/// It is not a compile-time error if `T` and `U` have different sizes, but it
/// is highly encouraged to only invoke this function where `T` and `U` have the
/// same size. This function triggers undefined behavior if `U` is larger than
/// `T`.
///
/// # Examples
///

View file

@ -154,7 +154,7 @@ fn next_f64(&mut self) -> f64 {
///
/// let mut v = [0; 13579];
/// thread_rng().fill_bytes(&mut v);
/// println!("{:?}", v);
/// println!("{:?}", &v[..]);
/// ```
fn fill_bytes(&mut self, dest: &mut [u8]) {
// this could, in theory, be done by transmuting dest to a

View file

@ -73,6 +73,7 @@
use std::fmt;
use std::hash::{Hash, SipHasher, Hasher};
use std::mem;
use std::num::ToPrimitive;
use std::ops;
use std::rc::Rc;
use std::vec::IntoIter;

View file

@ -744,7 +744,7 @@ fn bench_buf_writer(b: &mut Bencher) {
wr.write(&[5; 10]).unwrap();
}
}
assert_eq!(buf.as_ref(), [5; 100].as_ref());
assert_eq!(&buf[..], &[5; 100][..]);
});
}

View file

@ -414,7 +414,7 @@ fn from_str(s: &str) -> Result<SocketAddr, ParseError> {
/// Some examples:
///
/// ```rust,no_run
/// # #![feature(old_io, core)]
/// # #![feature(old_io, core, convert)]
/// # #![allow(unused_must_use)]
///
/// use std::old_io::{TcpStream, TcpListener};

View file

@ -367,7 +367,7 @@ pub fn spawn(&self) -> IoResult<Process> {
/// # Examples
///
/// ```
/// # #![feature(old_io, core)]
/// # #![feature(old_io, core, convert)]
/// use std::old_io::Command;
///
/// let output = match Command::new("cat").arg("foot.txt").output() {

View file

@ -92,7 +92,7 @@
("main", "1.0.0", Active),
// Deprecate after snapshot
// SNAP a923278
// SNAP 5520801
("unsafe_destructor", "1.0.0", Active),
// A temporary feature gate used to enable parser extensions needed

View file

@ -1,3 +1,13 @@
S 2015-03-27 5520801
bitrig-x86_64 41de2c7a69a1ac648d3fa3b65e96a29bdc122163
freebsd-x86_64 0910bbad35e213f679d0433884fd51398eb3bc8d
linux-i386 1ef82402ed16f5a6d2f87a9a62eaa83170e249ec
linux-x86_64 ef2154372e97a3cb687897d027fd51c8f2c5f349
macos-i386 0310b1a970f2da7e61770fd14dbbbdca3b518234
macos-x86_64 5f35d9c920b8083a7420ef8cf5b00d5ef3085dfa
winnt-i386 808b7961f85872f04ec15ad0d3e9e23ae9bc0c3b
winnt-x86_64 903a99a58f57a9bd9848cc68a2445dda881f1ee8
S 2015-03-25 a923278
bitrig-x86_64 41de2c7a69a1ac648d3fa3b65e96a29bdc122163
freebsd-x86_64 cd02c86a9218da73b2a45aff293787010d33bf3e