Skip to content

Commit 328959a

Browse files
committed
---
yaml --- r: 60638 b: refs/heads/auto c: c10e0cb h: refs/heads/master v: v3
1 parent 26db4e2 commit 328959a

File tree

17 files changed

+76
-54
lines changed

17 files changed

+76
-54
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 9200237b4d86cba8f3b222ff8957f79d54ecd0e1
17+
refs/heads/auto: c10e0cb9c984ece484a5c8c9c4c20369e2be499b
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libextra/std.rc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ pub mod serialize;
125125
pub mod std {
126126
pub use serialize;
127127
pub use test;
128+
129+
// For bootstrapping.
130+
pub use core::clone;
131+
pub use core::condition;
132+
pub use core::cmp;
133+
pub use core::sys;
128134
}
129135
#[doc(hidden)] // FIXME #3538
130136
pub mod extra {

branches/auto/src/librustc/rustc.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ extern mod extra(name = "extra");
2929
extern mod syntax;
3030

3131
// For deriving(Encodable) purposes...
32+
#[cfg(stage0)]
3233
extern mod std(name = "extra", vers = "0.7-pre");
34+
#[cfg(not(stage0))]
35+
extern mod std(name = "std", vers = "0.7-pre");
3336

3437
use core::prelude::*;
3538

branches/auto/src/libstd/core.rc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,14 @@ mod core {
225225
pub use sys;
226226
pub use pipes;
227227
}
228+
#[doc(hidden)]
229+
mod std {
230+
pub use clone;
231+
pub use cmp;
232+
pub use condition;
233+
pub use option;
234+
pub use kinds;
235+
pub use sys;
236+
pub use pipes;
237+
}
228238

branches/auto/src/libsyntax/ext/deriving/clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn expand_deriving_clone(cx: @ExtCtxt,
2222
in_items: ~[@item])
2323
-> ~[@item] {
2424
let trait_def = TraitDef {
25-
path: Path::new(~["core", "clone", "Clone"]),
25+
path: Path::new(~["std", "clone", "Clone"]),
2626
additional_bounds: ~[],
2727
generics: LifetimeBounds::empty(),
2828
methods: ~[
@@ -49,7 +49,7 @@ pub fn expand_deriving_deep_clone(cx: @ExtCtxt,
4949
in_items: ~[@item])
5050
-> ~[@item] {
5151
let trait_def = TraitDef {
52-
path: Path::new(~["core", "clone", "DeepClone"]),
52+
path: Path::new(~["std", "clone", "DeepClone"]),
5353
additional_bounds: ~[],
5454
generics: LifetimeBounds::empty(),
5555
methods: ~[

branches/auto/src/libsyntax/ext/deriving/cmp/eq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn expand_deriving_eq(cx: @ExtCtxt,
4646
);
4747

4848
let trait_def = TraitDef {
49-
path: Path::new(~["core", "cmp", "Eq"]),
49+
path: Path::new(~["std", "cmp", "Eq"]),
5050
additional_bounds: ~[],
5151
generics: LifetimeBounds::empty(),
5252
methods: ~[

branches/auto/src/libsyntax/ext/deriving/cmp/ord.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ pub fn expand_deriving_ord(cx: @ExtCtxt,
3838

3939

4040
let trait_def = TraitDef {
41-
path: Path::new(~["core", "cmp", "Ord"]),
41+
path: Path::new(~["std", "cmp", "Ord"]),
4242
// XXX: Ord doesn't imply Eq yet
43-
additional_bounds: ~[Literal(Path::new(~["core", "cmp", "Eq"]))],
43+
additional_bounds: ~[Literal(Path::new(~["std", "cmp", "Eq"]))],
4444
generics: LifetimeBounds::empty(),
4545
methods: ~[
4646
md!("lt", true, false),

branches/auto/src/libsyntax/ext/deriving/cmp/totaleq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn expand_deriving_totaleq(cx: @ExtCtxt,
2727
}
2828

2929
let trait_def = TraitDef {
30-
path: Path::new(~["core", "cmp", "TotalEq"]),
30+
path: Path::new(~["std", "cmp", "TotalEq"]),
3131
additional_bounds: ~[],
3232
generics: LifetimeBounds::empty(),
3333
methods: ~[

branches/auto/src/libsyntax/ext/deriving/cmp/totalord.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn expand_deriving_totalord(cx: @ExtCtxt,
2222
mitem: @meta_item,
2323
in_items: ~[@item]) -> ~[@item] {
2424
let trait_def = TraitDef {
25-
path: Path::new(~["core", "cmp", "TotalOrd"]),
25+
path: Path::new(~["std", "cmp", "TotalOrd"]),
2626
additional_bounds: ~[],
2727
generics: LifetimeBounds::empty(),
2828
methods: ~[
@@ -31,7 +31,7 @@ pub fn expand_deriving_totalord(cx: @ExtCtxt,
3131
generics: LifetimeBounds::empty(),
3232
explicit_self: borrowed_explicit_self(),
3333
args: ~[borrowed_self()],
34-
ret_ty: Literal(Path::new(~["core", "cmp", "Ordering"])),
34+
ret_ty: Literal(Path::new(~["std", "cmp", "Ordering"])),
3535
const_nonmatching: false,
3636
combine_substructure: cs_cmp
3737
}
@@ -51,7 +51,7 @@ pub fn ordering_const(cx: @ExtCtxt, span: span, cnst: Ordering) -> @expr {
5151
};
5252
cx.expr_path(
5353
cx.path_global(span,
54-
~[cx.ident_of("core"),
54+
~[cx.ident_of("std"),
5555
cx.ident_of("cmp"),
5656
cx.ident_of(cnst)]))
5757
}
@@ -64,7 +64,7 @@ pub fn cs_cmp(cx: @ExtCtxt, span: span,
6464
false,
6565
|cx, span, old, new| {
6666
cx.expr_call_global(span,
67-
~[cx.ident_of("core"),
67+
~[cx.ident_of("std"),
6868
cx.ident_of("cmp"),
6969
cx.ident_of("lexical_ordering")],
7070
~[old, new])

branches/auto/src/libsyntax/ext/deriving/iter_bytes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn expand_deriving_iter_bytes(cx: @ExtCtxt,
2121
mitem: @meta_item,
2222
in_items: ~[@item]) -> ~[@item] {
2323
let trait_def = TraitDef {
24-
path: Path::new(~["core", "to_bytes", "IterBytes"]),
24+
path: Path::new(~["std", "to_bytes", "IterBytes"]),
2525
additional_bounds: ~[],
2626
generics: LifetimeBounds::empty(),
2727
methods: ~[
@@ -31,7 +31,7 @@ pub fn expand_deriving_iter_bytes(cx: @ExtCtxt,
3131
explicit_self: borrowed_explicit_self(),
3232
args: ~[
3333
Literal(Path::new(~["bool"])),
34-
Literal(Path::new(~["core", "to_bytes", "Cb"]))
34+
Literal(Path::new(~["std", "to_bytes", "Cb"]))
3535
],
3636
ret_ty: Literal(Path::new(~["bool"])),
3737
const_nonmatching: false,

branches/auto/src/libsyntax/ext/deriving/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The compiler code necessary to implement the #[deriving] extensions.
1313
1414
1515
FIXME (#2810)--Hygiene. Search for "__" strings (in other files too).
16-
We also assume "extra" is the standard library, and "core" is the core
16+
We also assume "extra" is the standard library, and "std" is the core
1717
library.
1818
1919
*/

branches/auto/src/libsyntax/ext/deriving/rand.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn expand_deriving_rand(cx: @ExtCtxt,
2323
in_items: ~[@item])
2424
-> ~[@item] {
2525
let trait_def = TraitDef {
26-
path: Path::new(~["core", "rand", "Rand"]),
26+
path: Path::new(~["std", "rand", "Rand"]),
2727
additional_bounds: ~[],
2828
generics: LifetimeBounds::empty(),
2929
methods: ~[
@@ -32,7 +32,7 @@ pub fn expand_deriving_rand(cx: @ExtCtxt,
3232
generics: LifetimeBounds {
3333
lifetimes: ~[],
3434
bounds: ~[("R",
35-
~[ Path::new(~["core", "rand", "Rng"]) ])]
35+
~[ Path::new(~["std", "rand", "Rng"]) ])]
3636
},
3737
explicit_self: None,
3838
args: ~[
@@ -55,7 +55,7 @@ fn rand_substructure(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr {
5555
_ => cx.bug("Incorrect number of arguments to `rand` in `deriving(Rand)`")
5656
};
5757
let rand_ident = ~[
58-
cx.ident_of("core"),
58+
cx.ident_of("std"),
5959
cx.ident_of("rand"),
6060
cx.ident_of("Rand"),
6161
cx.ident_of("rand")

branches/auto/src/libsyntax/ext/deriving/to_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn expand_deriving_to_str(cx: @ExtCtxt,
2222
in_items: ~[@item])
2323
-> ~[@item] {
2424
let trait_def = TraitDef {
25-
path: Path::new(~["core", "to_str", "ToStr"]),
25+
path: Path::new(~["std", "to_str", "ToStr"]),
2626
additional_bounds: ~[],
2727
generics: LifetimeBounds::empty(),
2828
methods: ~[
@@ -46,7 +46,7 @@ fn to_str_substructure(cx: @ExtCtxt, span: span, substr: &Substructure) -> @expr
4646
[self_obj] => {
4747
let self_addr = cx.expr_addr_of(span, self_obj);
4848
cx.expr_call_global(span,
49-
~[cx.ident_of("core"),
49+
~[cx.ident_of("std"),
5050
cx.ident_of("sys"),
5151
cx.ident_of("log_str")],
5252
~[self_addr])

branches/auto/src/libsyntax/ext/expand.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -438,28 +438,28 @@ pub fn core_macros() -> ~str {
438438
fail!(\"explicit failure\")
439439
);
440440
($msg:expr) => (
441-
::core::sys::FailWithCause::fail_with($msg, file!(), line!())
441+
::std::sys::FailWithCause::fail_with($msg, file!(), line!())
442442
);
443443
($( $arg:expr ),+) => (
444-
::core::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
444+
::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
445445
)
446446
)
447447

448448
macro_rules! assert(
449449
($cond:expr) => {
450450
if !$cond {
451-
::core::sys::FailWithCause::fail_with(
451+
::std::sys::FailWithCause::fail_with(
452452
~\"assertion failed: \" + stringify!($cond), file!(), line!())
453453
}
454454
};
455455
($cond:expr, $msg:expr) => {
456456
if !$cond {
457-
::core::sys::FailWithCause::fail_with($msg, file!(), line!())
457+
::std::sys::FailWithCause::fail_with($msg, file!(), line!())
458458
}
459459
};
460460
($cond:expr, $( $arg:expr ),+) => {
461461
if !$cond {
462-
::core::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
462+
::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
463463
}
464464
}
465465
)
@@ -480,7 +480,7 @@ pub fn core_macros() -> ~str {
480480
macro_rules! assert_approx_eq (
481481
($given:expr , $expected:expr) => (
482482
{
483-
use core::cmp::ApproxEq;
483+
use std::cmp::ApproxEq;
484484

485485
let given_val = $given;
486486
let expected_val = $expected;
@@ -496,7 +496,7 @@ pub fn core_macros() -> ~str {
496496
);
497497
($given:expr , $expected:expr , $epsilon:expr) => (
498498
{
499-
use core::cmp::ApproxEq;
499+
use std::cmp::ApproxEq;
500500

501501
let given_val = $given;
502502
let expected_val = $expected;
@@ -518,11 +518,11 @@ pub fn core_macros() -> ~str {
518518
{ pub $c:ident: $in:ty -> $out:ty; } => {
519519

520520
pub mod $c {
521-
fn key(_x: @::core::condition::Handler<$in,$out>) { }
521+
fn key(_x: @::std::condition::Handler<$in,$out>) { }
522522

523523
pub static cond :
524-
::core::condition::Condition<'static,$in,$out> =
525-
::core::condition::Condition {
524+
::std::condition::Condition<'static,$in,$out> =
525+
::std::condition::Condition {
526526
name: stringify!($c),
527527
key: key
528528
};
@@ -533,11 +533,11 @@ pub fn core_macros() -> ~str {
533533

534534
// FIXME (#6009): remove mod's `pub` below once variant above lands.
535535
pub mod $c {
536-
fn key(_x: @::core::condition::Handler<$in,$out>) { }
536+
fn key(_x: @::std::condition::Handler<$in,$out>) { }
537537

538538
pub static cond :
539-
::core::condition::Condition<'static,$in,$out> =
540-
::core::condition::Condition {
539+
::std::condition::Condition<'static,$in,$out> =
540+
::std::condition::Condition {
541541
name: stringify!($c),
542542
key: key
543543
};

branches/auto/src/libsyntax/ext/pipes/ast_builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ impl append_types for @ast::Path {
6363
}
6464
}
6565
}
66+

0 commit comments

Comments
 (0)