Skip to content

Commit c05f4e0

Browse files
committed
---
yaml --- r: 49617 b: refs/heads/master c: 4cb5854 h: refs/heads/master i: 49615: 2d75d84 v: v3
1 parent 83a465c commit c05f4e0

File tree

114 files changed

+1318
-1659
lines changed

Some content is hidden

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

114 files changed

+1318
-1659
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: 05fba8c8f4c45d8f52b3aa70f9353f0adc1261eb
2+
refs/heads/master: 4cb5854d883d275872b16a200a2bfc30c53ccea3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea

trunk/AUTHORS.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Aydin Kim <[email protected]>
2121
2222
Ben Alpert <[email protected]>
2323
24+
Ben Kelly <[email protected]>
2425
Ben Striegel <[email protected]>
2526
Benjamin Herr <[email protected]>
2627
Benjamin Jackman <[email protected]>
@@ -44,9 +45,12 @@ Daniel Brooks <[email protected]>
4445
Daniel Luz <[email protected]>
4546
Daniel Micay <[email protected]>
4647
Daniel Patterson <[email protected]>
48+
Daniel Ursache Dogariu <[email protected]>
4749
Dave Herman <[email protected]>
4850
David Forsythe <[email protected]>
51+
David Klein <[email protected]>
4952
David Rajchenbach-Teller <[email protected]>
53+
Dimitri Krassovski <[email protected]>
5054
Donovan Preston <[email protected]>
5155
Drew Willcoxon <[email protected]>
5256
Elliott Slaughter <[email protected]>
@@ -66,6 +70,7 @@ Gonçalo Cabrita <[email protected]>
6670
Graham Fawcett <[email protected]>
6771
Grahame Bowland <[email protected]>
6872
Haitao Li <[email protected]>
73+
6974
Huon Wilson <[email protected]>
7075
Ian D. Bollinger <[email protected]>
7176
Ilyong Cho <[email protected]>
@@ -80,11 +85,14 @@ Jeff Balogh <[email protected]>
8085
Jeff Muizelaar <[email protected]>
8186
Jeff Olson <[email protected]>
8287
Jeffrey Yasskin <[email protected]>
88+
Jeong YunWon <[email protected]>
8389
Jens Nockert <[email protected]>
8490
Jesse Jones <[email protected]>
8591
Jesse Ruderman <[email protected]>
92+
Jihyun Yu <[email protected]>
8693
Jim Blandy <[email protected]>
8794
95+
J. J. Weber <[email protected]>
8896
Joe Pletcher <[email protected]>
8997
John Clements <[email protected]>
9098
Jon Morton <[email protected]>
@@ -99,6 +107,7 @@ Kevin Atkinson <[email protected]>
99107
Kevin Cantu <[email protected]>
100108
Kyeongwoon Lee <[email protected]>
101109
Laurent Bonnans <[email protected]>
110+
Lawrence Velázquez <[email protected]>
102111
Lennart Kudling <[email protected]>
103112
Lindsey Kuper <[email protected]>
104113
Luca Bruno <[email protected]>
@@ -112,7 +121,9 @@ Mark Vian <[email protected]>
112121
Martin DeMello <[email protected]>
113122
Marvin Löbel <[email protected]>
114123
Matt Brubeck <[email protected]>
124+
Matthew McPherrin <[email protected]>
115125
Matthew O'Connor <[email protected]>
126+
Matthijs Hofstra <[email protected]>
116127
Max Penet <[email protected]>
117128
Michael Arntzenius <[email protected]>
118129
Michael Bebenita <[email protected]>
@@ -121,6 +132,7 @@ Michael Sullivan <[email protected]>
121132
Mikko Perttunen <[email protected]>
122133
Nick Desaulniers <[email protected]>
123134
Niko Matsakis <[email protected]>
135+
Olivier Saut <[email protected]>
124136
Or Brostovski <[email protected]>
125137
Orphée Lafond-Lummis <[email protected]>
126138
Patrick Walton <[email protected]>
@@ -140,14 +152,17 @@ Roy Frostig <[email protected]>
140152
Ryan Scheel <[email protected]>
141153
Sean Stangl <[email protected]>
142154
Sebastian N. Fernandez <[email protected]>
155+
Seth Pink <[email protected]>
143156
Seo Sanghyeon <[email protected]>
157+
144158
Simon Barber-Dueck <[email protected]>
145159
Simon Sapin <[email protected]>
146160
startling <[email protected]>
147161
Stefan Plantikow <[email protected]>
148162
Steve Klabnik <[email protected]>
149163
Taras Shpot <[email protected]>
150164
Ted Horst <[email protected]>
165+
Thad Guidry <[email protected]>
151166
Tim Chevalier <[email protected]>
152167
Tim Taubert <[email protected]>
153168
@@ -161,5 +176,6 @@ Vincent Belliard <[email protected]>
161176
Wade Mealing <[email protected]>
162177
William Ting <[email protected]>
163178
Yasuhiro Fujii <[email protected]>
179+
Young-il Choi <[email protected]>
164180
Youngsoo Son <[email protected]>
165181
Zack Corr <[email protected]>

trunk/RELEASES.txt

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
11
Version 0.6 (March 2013)
22
---------------------------
33

4-
* ~2000 changes, numerous bugfixes
5-
6-
* TODO:
7-
* Ord/Cmp
8-
* Lifetime changes
9-
* Remove `static` keyword
10-
* Static method syntax
11-
* `as Trait`
12-
* `copy` removed, replaced with `Clone`?
13-
* More details for "Name resolution continues to be tweaked"?
4+
* ~2100 changes, numerous bugfixes
145

156
* Syntax changes
167
* The self type parameter in traits is now spelled `Self`
178
* The `self` parameter in trait and impl methods must now be explicitly
189
named (for example: `fn f(&self) { }`). Implicit self is deprecated.
10+
* Static methods no longer require the `static` keyword and instead
11+
are distinguished by the lack of a `self` parameter
1912
* Replaced the `Durable` trait with the `'static` lifetime
2013
* The old closure type syntax with the trailing sigil has been
2114
removed in favor of the more consistent leading sigil
2215
* `super` is a keyword, and may be prefixed to paths
2316
* Trait bounds are separated with `+` instead of whitespace
2417
* Traits are implemented with `impl Trait for Type`
2518
instead of `impl Type: Trait`
19+
* Lifetime syntax is now `&'l foo` instead of `&l/foo`
2620
* The `export` keyword has finally been removed
2721
* The `move` keyword has been removed (see "Semantic changes")
2822
* The interior mutability qualifier on vectors, `[mut T]`, has been
@@ -41,9 +35,11 @@ Version 0.6 (March 2013)
4135
* Pattern matching over vectors improved and expanded
4236
* `const` renamed to `static` to correspond to lifetime name,
4337
and make room for future `static mut` unsafe mutable globals.
44-
* Replaced `#[deriving_eq]` with `#[deriving(Eq)]`
38+
* Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
4539
* `Clone` implementations can be automatically generated with
4640
`#[deriving(Clone)]`
41+
* Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
42+
instead of `foo as Bar`.
4743

4844
* Semantic changes
4945
* Types with owned pointers or custom destructors move by default,
@@ -54,7 +50,11 @@ Version 0.6 (March 2013)
5450
* () has size 0
5551
* The name of the main function can be customized using #[main]
5652
* The default type of an inferred closure is &fn instead of @fn
57-
* Name resolution continues to be tweaked
53+
* `use` statements may no longer be "chained" - they cannot import
54+
identifiers imported by previous `use` statements
55+
* `use` statements are crate relative, importing from the "top"
56+
of the crate by default. Paths may be prefixed with `super::`
57+
or `self::` to change the search behavior.
5858
* Method visibility is inherited from the implementation declaration
5959
* Structural records have been removed
6060
* Many more types can be used in static items, including enums
@@ -78,14 +78,15 @@ Version 0.6 (March 2013)
7878
* `std::deque` and `std::smallintmap` reimplemented as owned containers
7979
* `core::trie` added as a fast ordered map for integer keys
8080
* Set types added to `core::hashmap`, `core::trie` and `std::treemap`
81+
* `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
82+
overload the comparison operators, whereas `TotalOrd` is used
83+
by certain container types
8184

82-
* Tools
85+
* Other
8386
* Replaced the 'cargo' package manager with 'rustpkg'
8487
* Added all-purpose 'rust' tool
8588
* `rustc --test` now supports benchmarks with the `#[bench]` attribute
86-
* rustc now attempts to offer spelling suggestions
87-
88-
* Misc
89+
* rustc now *attempts* to offer spelling suggestions
8990
* Improved support for ARM and Android
9091
* Preliminary MIPS backend
9192
* Improved foreign function ABI implementation for x86, x86_64

trunk/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 std::oldmap;
444+
# use core::hashmap::linear::LinearMap;
445445
# fn f() {
446446
# fn id<T:Copy>(t: T) -> T { t }
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
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
449449
# }
450450
~~~~
451451

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

trunk/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;
2120
use vec;
2221

2322
#[cfg(test)] use rand;
23+
#[cfg(test)] use rand::RngUtil;
2424

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

trunk/src/libcore/gc.rs

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

11+
#[doc(hidden)];
12+
1113
/*! Precise garbage collector
1214
1315
The precise GC exposes two functions, gc and

trunk/src/libcore/hashmap.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,11 @@ 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+
}
659664
}
660665

661666
#[test]

trunk/src/libcore/logging.rs

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

1111
//! Logging
1212
13-
use libc;
14-
1513
pub mod rustrt {
1614
use libc;
1715

@@ -49,6 +47,7 @@ pub fn console_off() {
4947
pub fn log_type<T>(level: u32, object: &T) {
5048
use cast::transmute;
5149
use io;
50+
use libc;
5251
use repr;
5352
use vec;
5453

trunk/src/libcore/repr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ 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+
}
454457
self.writer.write_char(')');
455458
true
456459
}
@@ -591,7 +594,6 @@ fn test_repr() {
591594
fail_unless!(s == e);
592595
}
593596

594-
595597
exact_test(&10, "10");
596598
exact_test(&true, "true");
597599
exact_test(&false, "false");
@@ -608,6 +610,7 @@ fn test_repr() {
608610
let mut x = 10;
609611
exact_test(&(&mut x), "&mut 10");
610612

613+
exact_test(&(1,), "(1,)");
611614
exact_test(&(@[1,2,3,4,5,6,7,8]),
612615
"@[1, 2, 3, 4, 5, 6, 7, 8]");
613616
exact_test(&(@[1u8,2u8,3u8,4u8]),

trunk/src/libcore/rt/io/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
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-
1411
pub mod file;
1512

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

trunk/src/libcore/rt/uv/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ 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;
4645
use super::uvll;
4746
use super::uvll::*;
4847
use unstable::finally::Finally;

trunk/src/libcore/rt/uvll.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
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;
3635

3736
pub struct uv_err_t {
3837
code: c_int,

trunk/src/libcore/to_str.rs

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

32-
// FIXME #4898: impl for one-tuples
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+
}
3342

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

trunk/src/libcore/tuple.rs

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

115-
// FIXME #4898: impl for one-tuples
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+
116154

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

trunk/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);

0 commit comments

Comments
 (0)