Skip to content

Commit

Permalink
register new snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Aparicio committed Jan 7, 2015
1 parent 9f1ead8 commit 6e2bfe4
Show file tree
Hide file tree
Showing 21 changed files with 12 additions and 384 deletions.
2 changes: 0 additions & 2 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ mod std {
pub use core::option; // necessary for panic!()
pub use core::clone; // deriving(Clone)
pub use core::cmp; // deriving(Eq, Ord, etc.)
#[cfg(stage0)]
pub use core::marker as kinds;
pub use core::marker; // deriving(Copy)
pub use core::hash; // deriving(Hash)
}
Expand Down
12 changes: 0 additions & 12 deletions src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,18 +921,6 @@ pub trait ToString {
fn to_string(&self) -> String;
}

#[cfg(stage0)]
impl<T: fmt::Show> ToString for T {
fn to_string(&self) -> String {
use core::fmt::Writer;
let mut buf = String::new();
let _ = buf.write_fmt(format_args!("{}", self));
buf.shrink_to_fit();
buf
}
}

#[cfg(not(stage0))]
impl<T: fmt::String> ToString for T {
fn to_string(&self) -> String {
use core::fmt::Writer;
Expand Down
9 changes: 0 additions & 9 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,15 +1454,6 @@ impl<T: fmt::Show> fmt::Show for Vec<T> {
}
}

#[cfg(stage0)]
#[experimental = "waiting on Show stability"]
impl<T: fmt::Show> fmt::String for Vec<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self.as_slice(), f)
}
}

#[cfg(not(stage0))]
#[experimental = "waiting on Show stability"]
impl<T: fmt::String> fmt::String for Vec<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down
40 changes: 0 additions & 40 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,15 +633,6 @@ impl String for bool {
}
}

#[cfg(stage0)]
//NOTE(stage0): remove impl after snapshot
impl Show for str {
fn fmt(&self, f: &mut Formatter) -> Result {
String::fmt(self, f)
}
}

#[cfg(not(stage0))]
//NOTE(stage0): remove cfg after snapshot
impl Show for str {
fn fmt(&self, f: &mut Formatter) -> Result {
Expand All @@ -659,15 +650,6 @@ impl String for str {
}
}

#[cfg(stage0)]
//NOTE(stage0): remove impl after snapshot
impl Show for char {
fn fmt(&self, f: &mut Formatter) -> Result {
String::fmt(self, f)
}
}

#[cfg(not(stage0))]
//NOTE(stage0): remove cfg after snapshot
impl Show for char {
fn fmt(&self, f: &mut Formatter) -> Result {
Expand Down Expand Up @@ -863,28 +845,6 @@ impl<T: Show> Show for [T] {
}
}

#[cfg(stage0)]
impl<T: Show> String for [T] {
fn fmt(&self, f: &mut Formatter) -> Result {
if f.flags & (1 << (rt::FlagAlternate as uint)) == 0 {
try!(write!(f, "["));
}
let mut is_first = true;
for x in self.iter() {
if is_first {
is_first = false;
} else {
try!(write!(f, ", "));
}
try!(write!(f, "{}", *x))
}
if f.flags & (1 << (rt::FlagAlternate as uint)) == 0 {
try!(write!(f, "]"));
}
Ok(())
}
}
#[cfg(not(stage0))]
impl<T: String> String for [T] {
fn fmt(&self, f: &mut Formatter) -> Result {
if f.flags & (1 << (rt::FlagAlternate as uint)) == 0 {
Expand Down
16 changes: 0 additions & 16 deletions src/libcore/fmt/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@ pub fn radix<T>(x: T, base: u8) -> RadixFmt<T, Radix> {

macro_rules! radix_fmt {
($T:ty as $U:ty, $fmt:ident, $S:expr) => {
#[cfg(stage0)]
impl fmt::Show for RadixFmt<$T, Radix> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}

#[cfg(not(stage0))]
impl fmt::Show for RadixFmt<$T, Radix> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(fmt::String::fmt(self, f));
Expand All @@ -188,14 +180,6 @@ macro_rules! int_base {

macro_rules! show {
($T:ident with $S:expr) => {
#[cfg(stage0)]
impl fmt::Show for $T {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}

#[cfg(not(stage0))]
impl fmt::Show for $T {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
try!(fmt::String::fmt(self, f));
Expand Down
2 changes: 0 additions & 2 deletions src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ mod core {
mod std {
pub use clone;
pub use cmp;
#[cfg(stage0)]
pub use marker as kinds;
pub use marker;
pub use option;
pub use fmt;
Expand Down
2 changes: 0 additions & 2 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5065,7 +5065,5 @@ pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen corre
#[doc(hidden)]
#[cfg(not(test))]
mod std {
#[cfg(stage0)]
pub use core::marker as kinds;
pub use core::marker;
}
2 changes: 0 additions & 2 deletions src/librand/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,6 @@ pub struct Closed01<F>(pub F);
mod std {
pub use core::{option, fmt}; // panic!()
pub use core::clone; // derive Clone
#[cfg(stage0)]
pub use core::marker as kinds;
pub use core::marker;
}

Expand Down
9 changes: 0 additions & 9 deletions src/libregex/re.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ impl Clone for ExNative {
}
}

#[cfg(stage0)]
//FIXME: remove after stage0 snapshot
impl fmt::Show for Regex {
/// Shows the original regular expression.
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self.as_str(), f)
}
}

impl fmt::String for Regex {
/// Shows the original regular expression.
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down
8 changes: 0 additions & 8 deletions src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,6 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
ast::PatRegion(ref inner, mutbl) => {
let inner_ty = fcx.infcx().next_ty_var();

// SNAP 340ac04 remove this `if`-`else` entirely after next snapshot
let mutbl = if mutbl == ast::MutImmutable {
ty::deref(fcx.infcx().shallow_resolve(expected), true)
.map(|mt| mt.mutbl).unwrap_or(ast::MutImmutable)
} else {
mutbl
};

let mt = ty::mt { ty: inner_ty, mutbl: mutbl };
let region = fcx.infcx().next_region_var(infer::PatternRegion(pat.span));
let rptr_ty = ty::mk_rptr(tcx, tcx.mk_region(region), mt);
Expand Down
8 changes: 0 additions & 8 deletions src/librustdoc/html/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ use std::fmt;
/// string when passed to a format string.
pub struct Escape<'a>(pub &'a str);

//NOTE(stage0): remove impl after snapshot
#[cfg(stage0)]
impl<'a> fmt::Show for Escape<'a> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}

impl<'a> fmt::String for Escape<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
// Because the internet is always right, turns out there's not that many
Expand Down
Loading

0 comments on commit 6e2bfe4

Please sign in to comment.