Skip to content

Commit f4fa7c8

Browse files
committed
Register new snapshots
1 parent e5e865b commit f4fa7c8

File tree

9 files changed

+13
-1265
lines changed

9 files changed

+13
-1265
lines changed

src/liballoc/heap.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,7 @@ unsafe fn exchange_malloc(size: uint, align: uint) -> *mut u8 {
133133
}
134134
}
135135

136-
#[cfg(not(test), stage0)]
137-
#[lang="exchange_free"]
138-
#[inline]
139-
unsafe fn exchange_free(ptr: *mut u8) {
140-
deallocate(ptr, 0, 8);
141-
}
142-
143-
#[cfg(not(test), not(stage0))]
136+
#[cfg(not(test))]
144137
#[lang="exchange_free"]
145138
#[inline]
146139
unsafe fn exchange_free(ptr: *mut u8, size: uint, align: uint) {

src/libcore/failure.rs

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@
3030

3131
use fmt;
3232
use intrinsics;
33-
#[cfg(not(test), stage0)]
34-
use str::raw::c_str_to_static_slice;
3533

3634
#[cold] #[inline(never)] // this is the slow path, always
3735
#[lang="fail_"]
38-
#[cfg(not(test), not(stage0))]
36+
#[cfg(not(test))]
3937
fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! {
4038
format_args!(|args| -> () {
4139
begin_unwind(args, file, line);
@@ -44,24 +42,9 @@ fn fail_(expr: &'static str, file: &'static str, line: uint) -> ! {
4442
unsafe { intrinsics::abort() }
4543
}
4644

47-
#[cold] #[inline(never)] // this is the slow path, always
48-
#[lang="fail_"]
49-
#[cfg(not(test), stage0)]
50-
fn fail_(expr: *u8, file: *u8, line: uint) -> ! {
51-
unsafe {
52-
let expr = c_str_to_static_slice(expr as *i8);
53-
let file = c_str_to_static_slice(file as *i8);
54-
format_args!(|args| -> () {
55-
begin_unwind(args, file, line);
56-
}, "{}", expr);
57-
58-
intrinsics::abort()
59-
}
60-
}
61-
6245
#[cold]
6346
#[lang="fail_bounds_check"]
64-
#[cfg(not(test), not(stage0))]
47+
#[cfg(not(test))]
6548
fn fail_bounds_check(file: &'static str, line: uint,
6649
index: uint, len: uint) -> ! {
6750
format_args!(|args| -> () {
@@ -70,28 +53,9 @@ fn fail_bounds_check(file: &'static str, line: uint,
7053
unsafe { intrinsics::abort() }
7154
}
7255

73-
#[cold]
74-
#[lang="fail_bounds_check"]
75-
#[cfg(not(test), stage0)]
76-
fn fail_bounds_check(file: *u8, line: uint, index: uint, len: uint) -> ! {
77-
let file = unsafe { c_str_to_static_slice(file as *i8) };
78-
format_args!(|args| -> () {
79-
begin_unwind(args, file, line);
80-
}, "index out of bounds: the len is {} but the index is {}", len, index);
81-
unsafe { intrinsics::abort() }
82-
}
83-
8456
#[cold]
8557
pub fn begin_unwind(fmt: &fmt::Arguments, file: &'static str, line: uint) -> ! {
8658
#[allow(ctypes)]
87-
#[cfg(stage0)]
88-
extern {
89-
#[link_name = "rust_begin_unwind"]
90-
fn begin_unwind(fmt: &fmt::Arguments, file: &'static str,
91-
line: uint) -> !;
92-
}
93-
#[allow(ctypes)]
94-
#[cfg(not(stage0))]
9559
extern {
9660
#[lang = "begin_unwind"]
9761
fn begin_unwind(fmt: &fmt::Arguments, file: &'static str,

src/libstd/fmt.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,6 @@ will look like `"\\{"`.
492492

493493
use io::Writer;
494494
use io;
495-
#[cfg(stage0)]
496-
use option::None;
497-
#[cfg(stage0)]
498-
use repr;
499495
use result::{Ok, Err};
500496
use str::{Str, StrAllocating};
501497
use str;
@@ -524,21 +520,6 @@ pub use core::fmt::{secret_float, secret_upper_exp, secret_lower_exp};
524520
#[doc(hidden)]
525521
pub use core::fmt::{secret_pointer};
526522

527-
#[doc(hidden)]
528-
#[cfg(stage0)]
529-
pub fn secret_poly<T: Poly>(x: &T, fmt: &mut Formatter) -> Result {
530-
// FIXME #11938 - UFCS would make us able call the this method
531-
// directly Poly::fmt(x, fmt).
532-
x.fmt(fmt)
533-
}
534-
535-
/// Format trait for the `?` character
536-
#[cfg(stage0)]
537-
pub trait Poly {
538-
/// Formats the value using the given formatter.
539-
fn fmt(&self, &mut Formatter) -> Result;
540-
}
541-
542523
/// The format function takes a precompiled format string and a list of
543524
/// arguments, to return the resulting formatted string.
544525
///
@@ -562,27 +543,6 @@ pub fn format(args: &Arguments) -> string::String{
562543
str::from_utf8(output.unwrap().as_slice()).unwrap().into_string()
563544
}
564545

565-
#[cfg(stage0)]
566-
impl<T> Poly for T {
567-
fn fmt(&self, f: &mut Formatter) -> Result {
568-
match (f.width, f.precision) {
569-
(None, None) => {
570-
match repr::write_repr(f, self) {
571-
Ok(()) => Ok(()),
572-
Err(..) => Err(WriteError),
573-
}
574-
}
575-
576-
// If we have a specified width for formatting, then we have to make
577-
// this allocation of a new string
578-
_ => {
579-
let s = repr::repr_to_str(self);
580-
f.pad(s.as_slice())
581-
}
582-
}
583-
}
584-
}
585-
586546
impl<'a> Writer for Formatter<'a> {
587547
fn write(&mut self, b: &[u8]) -> io::IoResult<()> {
588548
match (*self).write(b) {

src/libstd/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,6 @@ pub mod path;
241241
pub mod fmt;
242242
pub mod cleanup;
243243

244-
/* Unsupported interfaces */
245-
246-
#[unstable]
247-
pub mod repr;
248-
#[unstable]
249-
pub mod reflect;
250-
251244
// Private APIs
252245
#[unstable]
253246
pub mod unstable;

0 commit comments

Comments
 (0)