Skip to content

Commit 42b16a6

Browse files
committed
---
yaml --- r: 152156 b: refs/heads/try2 c: f4fa7c8 h: refs/heads/master v: v3
1 parent 2187b1e commit 42b16a6

File tree

12 files changed

+16
-1268
lines changed

12 files changed

+16
-1268
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: cc4513202d6f9c6896054ebaa1d99230b06e9f10
8+
refs/heads/try2: f4fa7c8a07a96cc9d0aae0bfc6515fb747f25341
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ config.stamp
8484
.DS_Store
8585
src/etc/dl
8686
.settings/
87-
/build
87+
build/
8888
i686-pc-mingw32/
8989
src/librustc/lib/llvmdeps.rs
9090
*.pot

branches/try2/src/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ underlying iterators are.
396396

397397
~~~
398398
let xs = [1, 2, 3, 4, 5];
399-
let ys = [7, 9, 11];
399+
let ys = ~[7, 9, 11];
400400
let mut it = xs.iter().chain(ys.iter());
401401
println!("{}", it.idx(0)); // prints `Some(1)`
402402
println!("{}", it.idx(5)); // prints `Some(7)`

branches/try2/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) {

branches/try2/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,

branches/try2/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) {

branches/try2/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)