Skip to content

Commit b391918

Browse files
committed
---
yaml --- r: 51007 b: refs/heads/try c: 05fba8c h: refs/heads/master i: 51005: 394b698 51003: b68f6f7 50999: 03696da 50991: e700053 50975: 02e62f2 50943: 5be9cff v: v3
1 parent 482d859 commit b391918

Some content is hidden

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

111 files changed

+1643
-1283
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: 5011d05db25fd3dfc0a9dc41fd914633ffb85469
5+
refs/heads/try: 05fba8c8f4c45d8f52b3aa70f9353f0adc1261eb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,11 @@ expression context, the final namespace qualifier is omitted.
441441
Two examples of paths with type arguments:
442442

443443
~~~~
444-
# use core::hashmap::linear::LinearMap;
444+
# use std::oldmap;
445445
# fn f() {
446446
# fn id<T:Copy>(t: T) -> T { t }
447-
type t = LinearMap<int,~str>; // Type arguments used in a type expression
448-
let x = id::<int>(10); // Type arguments used in a call expression
447+
type t = oldmap::HashMap<int,~str>; // Type arguments used in a type expression
448+
let x = id::<int>(10); // Type arguments used in a call expression
449449
# }
450450
~~~~
451451

branches/try/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,8 +1829,8 @@ illegal to copy and pass by value.
18291829
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
18301830

18311831
~~~~
1832-
# use core::hashmap::linear::LinearMap;
1833-
type Set<T> = LinearMap<T, ()>;
1832+
# use std::oldmap::HashMap;
1833+
type Set<T> = HashMap<T, ()>;
18341834
18351835
struct Stack<T> {
18361836
elements: ~[T]

branches/try/src/libcore/flate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ Simple compression
1717
use libc;
1818
use libc::{c_void, size_t, c_int};
1919
use ptr;
20+
use rand::RngUtil;
2021
use vec;
2122

2223
#[cfg(test)] use rand;
23-
#[cfg(test)] use rand::RngUtil;
2424

2525
pub mod rustrt {
2626
use libc::{c_int, c_void, size_t};

branches/try/src/libcore/hashmap.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,6 @@ pub mod linear {
656656
fn reserve_at_least(&mut self, n: uint) {
657657
self.map.reserve_at_least(n)
658658
}
659-
660-
/// Consumes all of the elements in the set, emptying it out
661-
fn consume(&mut self, f: &fn(T)) {
662-
self.map.consume(|k, _| f(k))
663-
}
664659
}
665660

666661
#[test]

branches/try/src/libcore/logging.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
//! Logging
1212
13+
use libc;
14+
1315
pub mod rustrt {
1416
use libc;
1517

@@ -47,7 +49,6 @@ pub fn console_off() {
4749
pub fn log_type<T>(level: u32, object: &T) {
4850
use cast::transmute;
4951
use io;
50-
use libc;
5152
use repr;
5253
use vec;
5354

branches/try/src/libcore/repr.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,6 @@ impl TyVisitor for ReprVisitor {
451451
}
452452
fn visit_leave_tup(&self, _n_fields: uint,
453453
_sz: uint, _align: uint) -> bool {
454-
if _n_fields == 1 {
455-
self.writer.write_char(',');
456-
}
457454
self.writer.write_char(')');
458455
true
459456
}
@@ -594,6 +591,7 @@ fn test_repr() {
594591
fail_unless!(s == e);
595592
}
596593

594+
597595
exact_test(&10, "10");
598596
exact_test(&true, "true");
599597
exact_test(&false, "false");
@@ -610,7 +608,6 @@ fn test_repr() {
610608
let mut x = 10;
611609
exact_test(&(&mut x), "&mut 10");
612610

613-
exact_test(&(1,), "(1,)");
614611
exact_test(&(@[1,2,3,4,5,6,7,8]),
615612
"@[1, 2, 3, 4, 5, 6, 7, 8]");
616613
exact_test(&(@[1u8,2u8,3u8,4u8]),

branches/try/src/libcore/rt/io/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use option::*;
12+
use comm::{GenericPort, GenericChan};
13+
1114
pub mod file;
1215

1316
// FIXME #5370 Strongly want this to be StreamError(&mut Stream)

branches/try/src/libcore/rt/uv/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ use ptr;
4242
use libc::{c_void, c_int, size_t, malloc, free, ssize_t};
4343
use cast::{transmute, transmute_mut_region};
4444
use ptr::null;
45+
use sys::size_of;
4546
use super::uvll;
4647
use super::uvll::*;
4748
use unstable::finally::Finally;

branches/try/src/libcore/rt/uvll.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use libc::{size_t, c_int, c_uint, c_void, c_char, uintptr_t};
3333
use libc::{malloc, free};
3434
use prelude::*;
35+
use ptr::to_unsafe_ptr;
3536

3637
pub struct uv_err_t {
3738
code: c_int,

branches/try/src/libcore/to_str.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ impl ToStr for () {
2929
fn to_str(&self) -> ~str { ~"()" }
3030
}
3131

32-
impl<A:ToStr> ToStr for (A,) {
33-
#[inline(always)]
34-
fn to_str(&self) -> ~str {
35-
match *self {
36-
(ref a,) => {
37-
~"(" + a.to_str() + ~", " + ~")"
38-
}
39-
}
40-
}
41-
}
32+
// FIXME #4898: impl for one-tuples
4233

4334
impl<A:ToStr,B:ToStr> ToStr for (A, B) {
4435
#[inline(always)]

branches/try/src/libcore/tuple.rs

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -112,45 +112,7 @@ impl<A:Copy,B:Copy> ExtendedTupleOps<A,B> for (~[A], ~[B]) {
112112
}
113113
}
114114

115-
#[cfg(notest)]
116-
impl<A:Eq> Eq for (A,) {
117-
#[inline(always)]
118-
fn eq(&self, other: &(A,)) -> bool {
119-
match (*self) {
120-
(ref self_a,) => match other {
121-
&(ref other_a,) => {
122-
(*self_a).eq(other_a)
123-
}
124-
}
125-
}
126-
}
127-
#[inline(always)]
128-
fn ne(&self, other: &(A,)) -> bool { !(*self).eq(other) }
129-
}
130-
131-
#[cfg(notest)]
132-
impl<A:Ord> Ord for (A,) {
133-
#[inline(always)]
134-
fn lt(&self, other: &(A,)) -> bool {
135-
match (*self) {
136-
(ref self_a,) => {
137-
match (*other) {
138-
(ref other_a,) => {
139-
if (*self_a).lt(other_a) { return true; }
140-
return false;
141-
}
142-
}
143-
}
144-
}
145-
}
146-
#[inline(always)]
147-
fn le(&self, other: &(A,)) -> bool { !other.lt(&(*self)) }
148-
#[inline(always)]
149-
fn ge(&self, other: &(A,)) -> bool { !self.lt(other) }
150-
#[inline(always)]
151-
fn gt(&self, other: &(A,)) -> bool { other.lt(&(*self)) }
152-
}
153-
115+
// FIXME #4898: impl for one-tuples
154116

155117
#[cfg(notest)]
156118
impl<A:Eq,B:Eq> Eq for (A, B) {

branches/try/src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ pub fn symbol_hash(tcx: ty::ctxt, symbol_hasher: &hash::State, t: ty::t,
642642
643643
pub fn get_symbol_hash(ccx: @CrateContext, t: ty::t) -> @str {
644644
match ccx.type_hashcodes.find(&t) {
645-
Some(&h) => h,
645+
Some(h) => h,
646646
None => {
647647
let hash = symbol_hash(ccx.tcx, ccx.symbol_hasher, t, ccx.link_meta);
648648
ccx.type_hashcodes.insert(t, hash);

branches/try/src/librustc/driver/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub fn compile_rest(sess: Session, cfg: ast::crate_cfg,
246246

247247
// These next two const passes can probably be merged
248248
time(time_passes, ~"const marking", ||
249-
middle::const_eval::process_crate(crate, ty_cx));
249+
middle::const_eval::process_crate(crate, def_map, ty_cx));
250250

251251
time(time_passes, ~"const checking", ||
252252
middle::check_const::check_crate(sess, crate, ast_map, def_map,
@@ -546,11 +546,11 @@ pub fn build_session_options(+binary: ~str,
546546
let flags = vec::append(getopts::opt_strs(matches, level_short),
547547
getopts::opt_strs(matches, level_name));
548548
for flags.each |lint_name| {
549-
let lint_name = str::replace(*lint_name, ~"-", ~"_");
549+
let lint_name = @str::replace(*lint_name, ~"-", ~"_");
550550
match lint_dict.find(&lint_name) {
551551
None => {
552552
early_error(demitter, fmt!("unknown %s flag: %s",
553-
level_name, lint_name));
553+
level_name, *lint_name));
554554
}
555555
Some(lint) => {
556556
lint_opts.push((lint.lint, *level));

branches/try/src/librustc/lib/llvm.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
use core::prelude::*;
1212

13-
use core::hashmap::linear::LinearMap;
1413
use core::libc::{c_char, c_int, c_uint, c_longlong, c_ulonglong};
1514
use core::option;
1615
use core::ptr;
1716
use core::str;
1817
use core::vec;
18+
use std::oldmap::HashMap;
1919

2020
pub type Opcode = u32;
2121
pub type Bool = c_uint;
@@ -1467,8 +1467,8 @@ pub fn SetLinkage(Global: ValueRef, Link: Linkage) {
14671467
/* Memory-managed object interface to type handles. */
14681468

14691469
pub struct TypeNames {
1470-
type_names: @mut LinearMap<TypeRef, @str>,
1471-
named_types: @mut LinearMap<@str, TypeRef>
1470+
type_names: HashMap<TypeRef, @str>,
1471+
named_types: HashMap<@str, TypeRef>
14721472
}
14731473

14741474
pub fn associate_type(tn: @TypeNames, s: @str, t: TypeRef) {
@@ -1477,17 +1477,17 @@ pub fn associate_type(tn: @TypeNames, s: @str, t: TypeRef) {
14771477
}
14781478

14791479
pub fn type_has_name(tn: @TypeNames, t: TypeRef) -> Option<@str> {
1480-
return tn.type_names.find(&t).map_consume(|x| *x);
1480+
return tn.type_names.find(&t);
14811481
}
14821482

14831483
pub fn name_has_type(tn: @TypeNames, s: @str) -> Option<TypeRef> {
1484-
return tn.named_types.find(&s).map_consume(|x| *x);
1484+
return tn.named_types.find(&s);
14851485
}
14861486

14871487
pub fn mk_type_names() -> @TypeNames {
14881488
@TypeNames {
1489-
type_names: @mut LinearMap::new(),
1490-
named_types: @mut LinearMap::new()
1489+
type_names: HashMap(),
1490+
named_types: HashMap()
14911491
}
14921492
}
14931493

branches/try/src/librustc/metadata/creader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ use metadata::filesearch::FileSearch;
1919
use metadata::loader;
2020

2121
use core::either;
22-
use core::hashmap::linear::LinearMap;
2322
use core::vec;
2423
use syntax::attr;
2524
use syntax::codemap::{span, dummy_sp};
2625
use syntax::diagnostic::span_handler;
2726
use syntax::parse::token::ident_interner;
2827
use syntax::visit;
2928
use syntax::{ast, ast_util};
29+
use std::oldmap::HashMap;
3030

3131
// Traverses an AST, reading all the information about use'd crates and extern
3232
// libraries necessary for later resolving, typechecking, linking, etc.
@@ -307,7 +307,7 @@ fn resolve_crate_deps(e: @mut Env, cdata: @~[u8]) -> cstore::cnum_map {
307307
debug!("resolving deps of external crate");
308308
// The map from crate numbers in the crate we're resolving to local crate
309309
// numbers
310-
let mut cnum_map = LinearMap::new();
310+
let cnum_map = HashMap();
311311
for decoder::get_crate_deps(e.intr, cdata).each |dep| {
312312
let extrn_cnum = dep.cnum;
313313
let cname = dep.name;
@@ -334,7 +334,7 @@ fn resolve_crate_deps(e: @mut Env, cdata: @~[u8]) -> cstore::cnum_map {
334334
}
335335
}
336336
}
337-
return @mut cnum_map;
337+
return cnum_map;
338338
}
339339

340340
// Local Variables:

0 commit comments

Comments
 (0)