Skip to content

Commit cbed98b

Browse files
Kimundibrson
authored andcommitted
---
yaml --- r: 41461 b: refs/heads/snap-stage3 c: 40f0b45 h: refs/heads/master i: 41459: 52076f4 v: v3
1 parent 7720459 commit cbed98b

File tree

130 files changed

+644
-526
lines changed

Some content is hidden

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

130 files changed

+644
-526
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4fd9264875c0e0ee450316e8fbf15977d8978a74
4+
refs/heads/snap-stage3: 40f0b45f8e42357f1f16669ab937e13df21161f3
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,10 @@ expression context, the final namespace qualifier is omitted.
448448
Two examples of paths with type arguments:
449449

450450
~~~~
451-
# use std::oldmap;
451+
# use std::map;
452452
# fn f() {
453453
# fn id<T:Copy>(t: T) -> T { t }
454-
type t = oldmap::HashMap<int,~str>; // Type arguments used in a type expression
454+
type t = map::HashMap<int,~str>; // Type arguments used in a type expression
455455
let x = id::<int>(10); // Type arguments used in a call expression
456456
# }
457457
~~~~

branches/snap-stage3/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ illegal to copy and pass by value.
17911791
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
17921792

17931793
~~~~
1794-
# use std::oldmap::HashMap;
1794+
# use std::map::HashMap;
17951795
type Set<T> = HashMap<T, ()>;
17961796
17971797
struct Stack<T> {

branches/snap-stage3/src/libcargo/cargo.rc

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ use core::io::WriterUtil;
5353
use core::result::{Ok, Err};
5454
use core::hashmap::linear::LinearMap;
5555
use std::getopts::{optflag, optopt, opt_present};
56-
use std::oldmap::HashMap;
57-
use std::{oldmap, json, tempfile, term, sort, getopts};
56+
use std::map::HashMap;
57+
use std::{map, json, tempfile, term, sort, getopts};
5858
use syntax::codemap::span;
5959
use syntax::diagnostic::span_handler;
6060
use syntax::diagnostic;
@@ -110,9 +110,9 @@ pub struct Cargo {
110110
libdir: Path,
111111
workdir: Path,
112112
sourcedir: Path,
113-
sources: oldmap::HashMap<~str, @Source>,
113+
sources: map::HashMap<~str, @Source>,
114114
mut current_install: ~str,
115-
dep_cache: oldmap::HashMap<~str, bool>,
115+
dep_cache: map::HashMap<~str, bool>,
116116
opts: Options
117117
}
118118

@@ -490,7 +490,7 @@ pub fn parse_source(name: ~str, j: &json::Json) -> @Source {
490490
}
491491

492492
pub fn try_parse_sources(filename: &Path,
493-
sources: oldmap::HashMap<~str, @Source>) {
493+
sources: map::HashMap<~str, @Source>) {
494494
if !os::path_exists(filename) { return; }
495495
let c = io::read_whole_file_str(filename);
496496
match json::from_str(c.get()) {
@@ -730,7 +730,7 @@ pub fn configure(opts: Options) -> Cargo {
730730
need_dir(&c.libdir);
731731
need_dir(&c.bindir);
732732

733-
for sources.each_key_ref |&k| {
733+
for sources.each_key |k| {
734734
let mut s = sources.get(k);
735735
load_source_packages(&c, s);
736736
sources.insert(k, s);
@@ -748,7 +748,7 @@ pub fn configure(opts: Options) -> Cargo {
748748
}
749749

750750
pub fn for_each_package(c: &Cargo, b: fn(s: @Source, p: &Package)) {
751-
for c.sources.each_value_ref |&v| {
751+
for c.sources.each_value |v| {
752752
for v.packages.each |p| {
753753
b(v, p);
754754
}
@@ -833,7 +833,7 @@ pub fn rustc_sysroot() -> ~str {
833833
}
834834
}
835835

836-
pub fn install_source(c: &mut Cargo, path: &Path) {
836+
pub fn install_source(c: &Cargo, path: &Path) {
837837
debug!("source: %s", path.to_str());
838838
os::change_dir(path);
839839

@@ -872,8 +872,7 @@ pub fn install_source(c: &mut Cargo, path: &Path) {
872872
}
873873
}
874874

875-
pub fn install_git(c: &mut Cargo, wd: &Path, url: ~str,
876-
reference: Option<~str>) {
875+
pub fn install_git(c: &Cargo, wd: &Path, url: ~str, reference: Option<~str>) {
877876
run::program_output(~"git", ~[~"clone", url, wd.to_str()]);
878877
if reference.is_some() {
879878
let r = reference.get();
@@ -884,7 +883,7 @@ pub fn install_git(c: &mut Cargo, wd: &Path, url: ~str,
884883
install_source(c, wd);
885884
}
886885

887-
pub fn install_curl(c: &mut Cargo, wd: &Path, url: ~str) {
886+
pub fn install_curl(c: &Cargo, wd: &Path, url: ~str) {
888887
let tarpath = wd.push("pkg.tar");
889888
let p = run::program_output(~"curl", ~[~"-f", ~"-s", ~"-o",
890889
tarpath.to_str(), url]);
@@ -897,14 +896,14 @@ pub fn install_curl(c: &mut Cargo, wd: &Path, url: ~str) {
897896
install_source(c, wd);
898897
}
899898

900-
pub fn install_file(c: &mut Cargo, wd: &Path, path: &Path) {
899+
pub fn install_file(c: &Cargo, wd: &Path, path: &Path) {
901900
run::program_output(~"tar", ~[~"-x", ~"--strip-components=1",
902901
~"-C", wd.to_str(),
903902
~"-f", path.to_str()]);
904903
install_source(c, wd);
905904
}
906905

907-
pub fn install_package(c: &mut Cargo, src: ~str, wd: &Path, pkg: Package) {
906+
pub fn install_package(c: &Cargo, src: ~str, wd: &Path, pkg: Package) {
908907
let url = copy pkg.url;
909908
let method = match pkg.method {
910909
~"git" => ~"git",
@@ -923,15 +922,15 @@ pub fn install_package(c: &mut Cargo, src: ~str, wd: &Path, pkg: Package) {
923922
}
924923

925924
pub fn cargo_suggestion(c: &Cargo, fallback: fn()) {
926-
if c.sources.is_empty() {
925+
if c.sources.size() == 0u {
927926
error(~"no sources defined - you may wish to run " +
928927
~"`cargo init`");
929928
return;
930929
}
931930
fallback();
932931
}
933932

934-
pub fn install_uuid(c: &mut Cargo, wd: &Path, uuid: ~str) {
933+
pub fn install_uuid(c: &Cargo, wd: &Path, uuid: ~str) {
935934
let mut ps = ~[];
936935
for_each_package(c, |s, p| {
937936
if p.uuid == uuid {
@@ -955,7 +954,7 @@ pub fn install_uuid(c: &mut Cargo, wd: &Path, uuid: ~str) {
955954
}
956955
}
957956

958-
pub fn install_named(c: &mut Cargo, wd: &Path, name: ~str) {
957+
pub fn install_named(c: &Cargo, wd: &Path, name: ~str) {
959958
let mut ps = ~[];
960959
for_each_package(c, |s, p| {
961960
if p.name == name {
@@ -979,8 +978,7 @@ pub fn install_named(c: &mut Cargo, wd: &Path, name: ~str) {
979978
}
980979
}
981980

982-
pub fn install_uuid_specific(c: &mut Cargo, wd: &Path, src: ~str,
983-
uuid: ~str) {
981+
pub fn install_uuid_specific(c: &Cargo, wd: &Path, src: ~str, uuid: ~str) {
984982
match c.sources.find(src) {
985983
Some(s) => {
986984
for s.packages.each |p| {
@@ -995,8 +993,7 @@ pub fn install_uuid_specific(c: &mut Cargo, wd: &Path, src: ~str,
995993
error(~"can't find package: " + src + ~"/" + uuid);
996994
}
997995

998-
pub fn install_named_specific(c: &mut Cargo, wd: &Path, src: ~str,
999-
name: ~str) {
996+
pub fn install_named_specific(c: &Cargo, wd: &Path, src: ~str, name: ~str) {
1000997
match c.sources.find(src) {
1001998
Some(s) => {
1002999
for s.packages.each |p| {
@@ -1063,7 +1060,7 @@ pub fn cmd_uninstall(c: &Cargo) {
10631060
}
10641061
}
10651062

1066-
pub fn install_query(c: &mut Cargo, wd: &Path, target: ~str) {
1063+
pub fn install_query(c: &Cargo, wd: &Path, target: ~str) {
10671064
match c.dep_cache.find(target) {
10681065
Some(inst) => {
10691066
if inst {
@@ -1115,7 +1112,10 @@ pub fn install_query(c: &mut Cargo, wd: &Path, target: ~str) {
11151112
// a bit of a hack. It should be cleaned up in the future.
11161113

11171114
if target == c.current_install {
1118-
c.dep_cache.clear();
1115+
for c.dep_cache.each |k, _v| {
1116+
c.dep_cache.remove(k);
1117+
}
1118+
11191119
c.current_install = ~"";
11201120
}
11211121
}
@@ -1128,7 +1128,7 @@ pub fn get_temp_workdir(c: &Cargo) -> Path {
11281128
}
11291129
}
11301130

1131-
pub fn cmd_install(c: &mut Cargo) {
1131+
pub fn cmd_install(c: &Cargo) {
11321132
unsafe {
11331133
let wd = get_temp_workdir(c);
11341134

@@ -1155,7 +1155,7 @@ pub fn cmd_install(c: &mut Cargo) {
11551155
}
11561156

11571157
pub fn sync(c: &Cargo) {
1158-
for c.sources.each_key_ref |&k| {
1158+
for c.sources.each_key |k| {
11591159
let mut s = c.sources.get(k);
11601160
sync_one(c, s);
11611161
c.sources.insert(k, s);
@@ -1569,7 +1569,7 @@ pub fn cmd_list(c: &Cargo) {
15691569
}
15701570
}
15711571
} else {
1572-
for c.sources.each_value_ref |&v| {
1572+
for c.sources.each_value |v| {
15731573
print_source(v);
15741574
}
15751575
}
@@ -1620,7 +1620,7 @@ pub fn dump_cache(c: &Cargo) {
16201620
}
16211621

16221622
pub fn dump_sources(c: &Cargo) {
1623-
if c.sources.is_empty() {
1623+
if c.sources.size() < 1u {
16241624
return;
16251625
}
16261626

@@ -1636,7 +1636,7 @@ pub fn dump_sources(c: &Cargo) {
16361636
result::Ok(writer) => {
16371637
let mut hash = ~LinearMap::new();
16381638

1639-
for c.sources.each_ref |&k, &v| {
1639+
for c.sources.each |k, v| {
16401640
let mut chash = ~LinearMap::new();
16411641

16421642
chash.insert(~"url", json::String(v.url));
@@ -1675,7 +1675,7 @@ pub fn copy_warn(srcfile: &Path, destfile: &Path) {
16751675

16761676
pub fn cmd_sources(c: &Cargo) {
16771677
if vec::len(c.opts.free) < 3u {
1678-
for c.sources.each_value_ref |&v| {
1678+
for c.sources.each_value |v| {
16791679
info(fmt!("%s (%s) via %s",
16801680
v.name, v.url, v.method));
16811681
}
@@ -1686,8 +1686,8 @@ pub fn cmd_sources(c: &Cargo) {
16861686

16871687
match action {
16881688
~"clear" => {
1689-
for c.sources.each_key_ref |&k| {
1690-
c.sources.remove(&k);
1689+
for c.sources.each_key |k| {
1690+
c.sources.remove(k);
16911691
}
16921692

16931693
info(~"cleared sources");
@@ -1706,7 +1706,7 @@ pub fn cmd_sources(c: &Cargo) {
17061706
return;
17071707
}
17081708

1709-
if c.sources.contains_key_ref(&name) {
1709+
if c.sources.contains_key(name) {
17101710
error(fmt!("source already exists: %s", name));
17111711
} else {
17121712
c.sources.insert(name, @Source {
@@ -1733,8 +1733,8 @@ pub fn cmd_sources(c: &Cargo) {
17331733
return;
17341734
}
17351735

1736-
if c.sources.contains_key_ref(&name) {
1737-
c.sources.remove(&name);
1736+
if c.sources.contains_key(name) {
1737+
c.sources.remove(name);
17381738
info(fmt!("removed source: %s", name));
17391739
} else {
17401740
error(fmt!("no such source: %s", name));
@@ -1825,7 +1825,7 @@ pub fn cmd_sources(c: &Cargo) {
18251825

18261826
match c.sources.find(name) {
18271827
Some(source) => {
1828-
c.sources.remove(&name);
1828+
c.sources.remove(name);
18291829
c.sources.insert(newn, source);
18301830
info(fmt!("renamed source: %s to %s", name, newn));
18311831
}
@@ -1967,7 +1967,7 @@ pub fn main() {
19671967

19681968
match o.free[1] {
19691969
~"init" => cmd_init(&c),
1970-
~"install" => cmd_install(&mut c),
1970+
~"install" => cmd_install(&c),
19711971
~"uninstall" => cmd_uninstall(&c),
19721972
~"list" => cmd_list(&c),
19731973
~"search" => cmd_search(&c),

branches/snap-stage3/src/libcore/core.rc

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,33 @@ pub mod prelude;
6060

6161
/* Primitive types */
6262

63-
#[path = "int-template.rs"] #[merge = "int-template/int.rs"]
63+
#[path = "num/int-template.rs"] #[merge = "num/int-template/int.rs"]
6464
pub mod int;
65-
#[path = "int-template.rs"] #[merge = "int-template/i8.rs"]
65+
#[path = "num/int-template.rs"] #[merge = "num/int-template/i8.rs"]
6666
pub mod i8;
67-
#[path = "int-template.rs"] #[merge = "int-template/i16.rs"]
67+
#[path = "num/int-template.rs"] #[merge = "num/int-template/i16.rs"]
6868
pub mod i16;
69-
#[path = "int-template.rs"] #[merge = "int-template/i32.rs"]
69+
#[path = "num/int-template.rs"] #[merge = "num/int-template/i32.rs"]
7070
pub mod i32;
71-
#[path = "int-template.rs"] #[merge = "int-template/i64.rs"]
71+
#[path = "num/int-template.rs"] #[merge = "num/int-template/i64.rs"]
7272
pub mod i64;
73-
#[path = "uint-template.rs"] #[merge = "uint-template/uint.rs"]
73+
#[path = "num/uint-template.rs"] #[merge = "num/uint-template/uint.rs"]
7474
pub mod uint;
7575

76-
#[path = "uint-template.rs"] #[merge = "uint-template/u8.rs"]
76+
#[path = "num/uint-template.rs"] #[merge = "num/uint-template/u8.rs"]
7777
pub mod u8;
78-
#[path = "uint-template.rs"] #[merge = "uint-template/u16.rs"]
78+
#[path = "num/uint-template.rs"] #[merge = "num/uint-template/u16.rs"]
7979
pub mod u16;
80-
#[path = "uint-template.rs"] #[merge = "uint-template/u32.rs"]
80+
#[path = "num/uint-template.rs"] #[merge = "num/uint-template/u32.rs"]
8181
pub mod u32;
82-
#[path = "uint-template.rs"] #[merge = "uint-template/u64.rs"]
82+
#[path = "num/uint-template.rs"] #[merge = "num/uint-template/u64.rs"]
8383
pub mod u64;
8484

85+
#[path = "num/float.rs"]
8586
pub mod float;
87+
#[path = "num/f32.rs"]
8688
pub mod f32;
89+
#[path = "num/f64.rs"]
8790
pub mod f64;
8891

8992
pub mod nil;
@@ -116,6 +119,7 @@ pub mod managed;
116119
/* Common traits */
117120

118121
pub mod from_str;
122+
#[path = "num/num.rs"]
119123
pub mod num;
120124
pub mod iter;
121125
pub mod to_str;
@@ -232,6 +236,7 @@ pub mod private;
232236
/* For internal use, not exported */
233237

234238
mod unicode;
239+
#[path = "num/cmath.rs"]
235240
mod cmath;
236241
mod stackwalk;
237242

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use core::ptr;
3636
use core::run;
3737
use core::str;
3838
use core::vec;
39-
use std::oldmap::HashMap;
39+
use std::map::HashMap;
4040
use std::sha1::sha1;
4141
use syntax::ast;
4242
use syntax::ast_map::{path, path_mod, path_name};

branches/snap-stage3/src/librustc/back/rpath.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use core::os;
1818
use core::uint;
1919
use core::util;
2020
use core::vec;
21-
use std::oldmap::HashMap;
22-
use std::oldmap;
21+
use std::map::HashMap;
22+
use std::map;
2323

2424
pure fn not_win32(os: session::os) -> bool {
2525
match os {
@@ -187,7 +187,7 @@ pub fn get_install_prefix_rpath(target_triple: &str) -> Path {
187187
}
188188
189189
pub fn minimize_rpaths(rpaths: &[Path]) -> ~[Path] {
190-
let set = oldmap::HashMap();
190+
let set = map::HashMap();
191191
let mut minimized = ~[];
192192
for rpaths.each |rpath| {
193193
let s = rpath.to_str();

branches/snap-stage3/src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use std::getopts::groups::{optopt, optmulti, optflag, optflagopt, getopts};
3535
use std::getopts::groups;
3636
use std::getopts::{opt_present};
3737
use std::getopts;
38-
use std::oldmap::HashMap;
38+
use std::map::HashMap;
3939
use std;
4040
use syntax::ast;
4141
use syntax::ast_map;

0 commit comments

Comments
 (0)