Skip to content

Commit f033cba

Browse files
committed
---
yaml --- r: 113887 b: refs/heads/master c: 828ffab h: refs/heads/master i: 113885: fc2703c 113883: 4dd16c4 113879: 2371619 113871: af4669d 113855: cf1a67e v: v3
1 parent 3d5b364 commit f033cba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+14124
-12875
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 55a8bd56e5a89f98aa9d4ed998cb8c686d447805
2+
refs/heads/master: 828ffab627350c6250786e0e4960bc3d3aa0b761
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/mk/crates.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz
54+
workcache url log regex graphviz core
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

59-
DEPS_std := libc native:rustrt native:compiler-rt native:backtrace
59+
DEPS_core :=
60+
DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace
6061
DEPS_green := std rand native:context_switch
6162
DEPS_rustuv := std native:uv native:uv_support
6263
DEPS_native := std
@@ -95,6 +96,8 @@ TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
9596
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
9697
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
9798

99+
ONLY_RLIB_core := 1
100+
98101
################################################################################
99102
# You should not need to edit below this line
100103
################################################################################

trunk/mk/host.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# $(5) - the name of the crate being processed
1919
define CP_HOST_STAGE_N_CRATE
2020

21+
ifeq ($$(ONLY_RLIB_$(5)),)
2122
$$(HLIB$(2)_H_$(4))/stamp.$(5): \
2223
$$(TLIB$(1)_T_$(3)_H_$(4))/stamp.$(5) \
2324
$$(RUST_DEPS_$(5):%=$$(HLIB$(2)_H_$(4))/stamp.%) \
@@ -30,6 +31,10 @@ $$(HLIB$(2)_H_$(4))/stamp.$(5): \
3031
$$(HLIB$(2)_H_$(4))
3132
$$(call LIST_ALL_OLD_GLOB_MATCHES,\
3233
$$(dir $$@)$$(call CFG_LIB_GLOB_$(3),$(5)))
34+
else
35+
$$(HLIB$(2)_H_$(4))/stamp.$(5):
36+
$$(Q)touch $$@
37+
endif
3338

3439
endef
3540

@@ -54,9 +59,6 @@ endef
5459
# $(4) - the host triple (same as $(3))
5560
define CP_HOST_STAGE_N
5661

57-
$$(HBIN$(2)_H_$(4))/:
58-
@mkdir -p $$@
59-
6062
ifneq ($(CFG_LIBDIR_RELATIVE),bin)
6163
$$(HLIB$(2)_H_$(4))/:
6264
@mkdir -p $$@

trunk/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3274,7 +3274,7 @@ The machine types are the following:
32743274

32753275
* The signed two's complement word types `i8`, `i16`, `i32` and `i64`, with
32763276
values drawn from the integer intervals [-(2^(7)), 2^7 - 1],
3277-
[-(2^(15)), 2^15 - 1], $[-(2^(31)), 2^31 - 1], [-(2^(63)), 2^63 - 1]
3277+
[-(2^(15)), 2^15 - 1], [-(2^(31)), 2^31 - 1], [-(2^(63)), 2^63 - 1]
32783278
respectively.
32793279

32803280
* The IEEE 754-2008 `binary32` and `binary64` floating-point types: `f32` and

trunk/src/libstd/any.rs renamed to trunk/src/libcore/any.rs

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
//! the extension traits (`*Ext`) for the full details.
2222
2323
use cast::{transmute, transmute_copy};
24-
use fmt;
2524
use option::{Option, Some, None};
2625
use owned::Box;
2726
use raw::TraitObject;
@@ -145,28 +144,12 @@ impl AnyOwnExt for Box<Any> {
145144
}
146145
}
147146

148-
///////////////////////////////////////////////////////////////////////////////
149-
// Trait implementations
150-
///////////////////////////////////////////////////////////////////////////////
151-
152-
impl fmt::Show for Box<Any> {
153-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
154-
f.pad("Box<Any>")
155-
}
156-
}
157-
158-
impl<'a> fmt::Show for &'a Any {
159-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
160-
f.pad("&Any")
161-
}
162-
}
163-
164147
#[cfg(test)]
165148
mod tests {
166149
use prelude::*;
167150
use super::*;
168151
use owned::Box;
169-
use str::StrSlice;
152+
use realstd::str::StrAllocating;
170153

171154
#[deriving(Eq, Show)]
172155
struct Test;
@@ -291,13 +274,13 @@ mod tests {
291274

292275
#[test]
293276
fn test_show() {
294-
let a = box 8u as Box<Any>;
295-
let b = box Test as Box<Any>;
277+
let a = box 8u as Box<::realcore::any::Any>;
278+
let b = box Test as Box<::realcore::any::Any>;
296279
assert_eq!(format!("{}", a), "Box<Any>".to_owned());
297280
assert_eq!(format!("{}", b), "Box<Any>".to_owned());
298281

299-
let a = &8u as &Any;
300-
let b = &Test as &Any;
282+
let a = &8u as &::realcore::any::Any;
283+
let b = &Test as &::realcore::any::Any;
301284
assert_eq!(format!("{}", a), "&Any".to_owned());
302285
assert_eq!(format!("{}", b), "&Any".to_owned());
303286
}

trunk/src/libstd/bool.rs renamed to trunk/src/libcore/bool.rs

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
//!
1515
//! Implementations of the following traits:
1616
//!
17-
//! * `FromStr`
1817
//! * `Not`
1918
//! * `Ord`
2019
//! * `TotalOrd`
@@ -24,11 +23,9 @@
2423
//!
2524
//! A `to_bit` conversion function.
2625
27-
use from_str::FromStr;
2826
use num::{Int, one, zero};
29-
use option::{None, Option, Some};
3027

31-
#[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering};
28+
#[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering, TotalEq};
3229
#[cfg(not(test))] use ops::{Not, BitAnd, BitOr, BitXor};
3330
#[cfg(not(test))] use default::Default;
3431

@@ -55,28 +52,6 @@ pub fn to_bit<N: Int>(p: bool) -> N {
5552
// Trait impls on `bool`
5653
/////////////////////////////////////////////////////////////////////////////
5754

58-
impl FromStr for bool {
59-
/// Parse a `bool` from a string.
60-
///
61-
/// Yields an `Option<bool>`, because `s` may or may not actually be parseable.
62-
///
63-
/// # Examples
64-
///
65-
/// ```rust
66-
/// assert_eq!(from_str::<bool>("true"), Some(true));
67-
/// assert_eq!(from_str::<bool>("false"), Some(false));
68-
/// assert_eq!(from_str::<bool>("not even a boolean"), None);
69-
/// ```
70-
#[inline]
71-
fn from_str(s: &str) -> Option<bool> {
72-
match s {
73-
"true" => Some(true),
74-
"false" => Some(false),
75-
_ => None,
76-
}
77-
}
78-
}
79-
8055
#[cfg(not(test))]
8156
impl Not<bool> for bool {
8257
/// The logical complement of a boolean value.
@@ -190,16 +165,18 @@ impl Eq for bool {
190165
fn eq(&self, other: &bool) -> bool { (*self) == (*other) }
191166
}
192167

168+
#[cfg(not(test))]
169+
impl TotalEq for bool {}
170+
193171
#[cfg(not(test))]
194172
impl Default for bool {
195173
fn default() -> bool { false }
196174
}
197175

198176
#[cfg(test)]
199177
mod tests {
200-
use prelude::*;
178+
use realstd::prelude::*;
201179
use super::to_bit;
202-
use str::StrSlice;
203180

204181
#[test]
205182
fn test_to_bit() {
@@ -260,13 +237,6 @@ mod tests {
260237
assert_eq!(!false, true);
261238
}
262239

263-
#[test]
264-
fn test_from_str() {
265-
assert_eq!(from_str::<bool>("true"), Some(true));
266-
assert_eq!(from_str::<bool>("false"), Some(false));
267-
assert_eq!(from_str::<bool>("not even a boolean"), None);
268-
}
269-
270240
#[test]
271241
fn test_to_str() {
272242
assert_eq!(false.to_str(), "false".to_owned());

trunk/src/libstd/cast.rs renamed to trunk/src/libcore/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
108108
mod tests {
109109
use cast::{bump_box_refcount, transmute};
110110
use raw;
111-
use str::StrSlice;
111+
use realstd::str::StrAllocating;
112112

113113
#[test]
114114
fn test_transmute_copy() {

trunk/src/libstd/cell.rs renamed to trunk/src/libcore/cell.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
use clone::Clone;
1414
use cmp::Eq;
15-
use fmt;
1615
use kinds::{marker, Copy};
1716
use ops::{Deref, DerefMut, Drop};
1817
use option::{None, Option, Some};
@@ -60,12 +59,6 @@ impl<T:Eq + Copy> Eq for Cell<T> {
6059
}
6160
}
6261

63-
impl<T: Copy + fmt::Show> fmt::Show for Cell<T> {
64-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
65-
write!(f.buf, r"Cell \{ value: {} \}", self.get())
66-
}
67-
}
68-
6962
/// A mutable memory location with dynamically checked borrow rules
7063
pub struct RefCell<T> {
7164
value: Unsafe<T>,
@@ -228,22 +221,22 @@ mod test {
228221
#[test]
229222
fn smoketest_cell() {
230223
let x = Cell::new(10);
231-
assert_eq!(x, Cell::new(10));
232-
assert_eq!(x.get(), 10);
224+
assert!(x == Cell::new(10));
225+
assert!(x.get() == 10);
233226
x.set(20);
234-
assert_eq!(x, Cell::new(20));
235-
assert_eq!(x.get(), 20);
227+
assert!(x == Cell::new(20));
228+
assert!(x.get() == 20);
236229

237230
let y = Cell::new((30, 40));
238-
assert_eq!(y, Cell::new((30, 40)));
239-
assert_eq!(y.get(), (30, 40));
231+
assert!(y == Cell::new((30, 40)));
232+
assert!(y.get() == (30, 40));
240233
}
241234

242235
#[test]
243236
fn cell_has_sensible_show() {
244237
use str::StrSlice;
245238

246-
let x = Cell::new("foo bar");
239+
let x = ::realcore::cell::Cell::new("foo bar");
247240
assert!(format!("{}", x).contains(x.get()));
248241

249242
x.set("baz qux");

0 commit comments

Comments
 (0)