Skip to content

Commit 3762574

Browse files
committed
---
yaml --- r: 55994 b: refs/heads/auto c: 3e67085 h: refs/heads/master v: v3
1 parent 9226c76 commit 3762574

Some content is hidden

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

76 files changed

+1333
-1916
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: 9963bd24138999e745584a138f8381f91e3a308c
17+
refs/heads/auto: 3e67085d7a590ef360e7c85cc6c3931bae6df6a5
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "src/llvm"]
22
path = src/llvm
3-
url = https://github.com/brson/llvm.git
3+
url = git://github.com/brson/llvm.git
44
[submodule "src/libuv"]
55
path = src/libuv
6-
url = https://github.com/brson/libuv.git
6+
url = git://github.com/brson/libuv.git

branches/auto/doc/rust.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,12 +1653,11 @@ Path expressions are [lvalues](#lvalues-rvalues-and-temporaries).
16531653

16541654
### Tuple expressions
16551655

1656-
Tuples are written by enclosing one or more comma-separated
1656+
Tuples are written by enclosing two or more comma-separated
16571657
expressions in parentheses. They are used to create [tuple-typed](#tuple-types)
16581658
values.
16591659

16601660
~~~~~~~~ {.tuple}
1661-
(0,);
16621661
(0f, 4.5f);
16631662
("a", 4u, true);
16641663
~~~~~~~~
@@ -2579,7 +2578,7 @@ to the record type-constructor. The differences are as follows:
25792578

25802579
Tuple types and values are denoted by listing the types or values of their
25812580
elements, respectively, in a parenthesized, comma-separated
2582-
list.
2581+
list. Single-element tuples are not legal; all tuples have two or more values.
25832582

25842583
The members of a tuple are laid out in memory contiguously, like a record, in
25852584
order specified by the tuple type.

branches/auto/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ fn area(sh: Shape) -> float {
747747

748748
Tuples in Rust behave exactly like structs, except that their fields
749749
do not have names. Thus, you cannot access their fields with dot notation.
750-
Tuples can have any arity except for 0 (though you may consider
750+
Tuples can have any arity except for 0 or 1 (though you may consider
751751
unit, `()`, as the empty tuple if you like).
752752

753753
~~~~
@@ -2320,7 +2320,7 @@ impl Shape for CircleStruct {
23202320
Notice that methods of `Circle` can call methods on `Shape`, as our
23212321
`radius` implementation calls the `area` method.
23222322
This is a silly way to compute the radius of a circle
2323-
(since we could just return the `radius` field), but you get the idea.
2323+
(since we could just return the `circle` field), but you get the idea.
23242324

23252325
In type-parameterized functions,
23262326
methods of the supertrait may be called on values of subtrait-bound type parameters.

branches/auto/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,5 @@ See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
170170
<\fI[email protected]\fR> is the project leader.
171171

172172
.SH "COPYRIGHT"
173-
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR
174-
file in the rust source distribution.
173+
This work is licensed under MIT-like terms. See \fBLICENSE.txt\fR
174+
in the rust source distribution.

branches/auto/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ PKG_FILES := \
1818
$(S)COPYRIGHT \
1919
$(S)LICENSE-APACHE \
2020
$(S)LICENSE-MIT \
21-
$(S)AUTHORS.txt \
2221
$(S)README.md \
2322
$(S)configure $(S)Makefile.in \
2423
$(S)man \

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,8 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9
110110
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
111111
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
112112

113-
syn region rustCommentDoc start="/\*\*" end="\*/"
114-
syn region rustCommentDoc start="///" skip="\\$" end="$" keepend
115-
syn match rustComment "/\*\*/"
116-
syn region rustComment start="/\*\([^\*]\|$\)" end="\*/" contains=rustTodo
117-
syn region rustComment start="//\([^/]\|$\)" skip="\\$" end="$" contains=rustTodo keepend
113+
syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
114+
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
118115

119116
syn keyword rustTodo contained TODO FIXME XXX NB
120117

@@ -137,7 +134,6 @@ hi def link rustConditional Conditional
137134
hi def link rustIdentifier Identifier
138135
hi def link rustModPath Include
139136
hi def link rustFuncName Function
140-
hi def link rustCommentDoc SpecialComment
141137
hi def link rustComment Comment
142138
hi def link rustMacro Macro
143139
hi def link rustType Type

branches/auto/src/libcore/char.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,12 @@ pub fn escape_unicode(c: char) -> ~str {
202202
else { ('U', 8u) });
203203
assert!(str::len(s) <= pad);
204204
let mut out = ~"\\";
205-
str::push_str(&mut out, str::from_char(c));
206-
for uint::range(str::len(s), pad) |_i|
207-
{ str::push_str(&mut out, ~"0"); }
208-
str::push_str(&mut out, s);
205+
unsafe {
206+
str::push_str(&mut out, str::from_char(c));
207+
for uint::range(str::len(s), pad) |_i|
208+
{ str::push_str(&mut out, ~"0"); }
209+
str::push_str(&mut out, s);
210+
}
209211
out
210212
}
211213

branches/auto/src/libcore/clone.rs

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In Rust, some simple types are "implicitly copyable" and when you
1414
assign them or pass them as arguments, the receiver will get a copy,
1515
leaving the original value in place. These types do not require
1616
allocation to copy and do not have finalizers (i.e. they do not
17-
contain owned boxes or implement `Drop`), so the compiler considers
17+
contain owned pointers or implement `Drop`), so the compiler considers
1818
them cheap and safe to copy and automatically implements the `Copy`
1919
trait for them. For other types copies must be made explicitly,
2020
by convention implementing the `Clone` trait and calling the
@@ -23,38 +23,32 @@ by convention implementing the `Clone` trait and calling the
2323
*/
2424

2525
pub trait Clone {
26-
/// Return a deep copy of the owned object tree. Managed boxes are cloned with a shallow copy.
2726
fn clone(&self) -> Self;
2827
}
2928

3029
impl Clone for () {
31-
/// Return a copy of the value.
3230
#[inline(always)]
3331
fn clone(&self) -> () { () }
3432
}
3533

3634
impl<T:Clone> Clone for ~T {
37-
/// Return a deep copy of the owned box.
3835
#[inline(always)]
3936
fn clone(&self) -> ~T { ~(**self).clone() }
4037
}
4138

42-
impl<T> Clone for @T {
43-
/// Return a shallow copy of the managed box.
39+
impl<T:Clone> Clone for @T {
4440
#[inline(always)]
45-
fn clone(&self) -> @T { *self }
41+
fn clone(&self) -> @T { @(**self).clone() }
4642
}
4743

48-
impl<T> Clone for @mut T {
49-
/// Return a shallow copy of the managed box.
44+
impl<T:Clone> Clone for @mut T {
5045
#[inline(always)]
51-
fn clone(&self) -> @mut T { *self }
46+
fn clone(&self) -> @mut T { @mut (**self).clone() }
5247
}
5348

5449
macro_rules! clone_impl(
5550
($t:ty) => {
5651
impl Clone for $t {
57-
/// Return a copy of the value.
5852
#[inline(always)]
5953
fn clone(&self) -> $t { *self }
6054
}
@@ -82,23 +76,21 @@ clone_impl!(char)
8276

8377
#[test]
8478
fn test_owned_clone() {
85-
let a: ~int = ~5i;
86-
let b: ~int = a.clone();
79+
let a : ~int = ~5i;
80+
let b : ~int = a.clone();
8781
assert!(a == b);
8882
}
8983

9084
#[test]
9185
fn test_managed_clone() {
92-
let a: @int = @5i;
93-
let b: @int = a.clone();
86+
let a : @int = @5i;
87+
let b : @int = a.clone();
9488
assert!(a == b);
9589
}
9690

9791
#[test]
9892
fn test_managed_mut_clone() {
99-
let a: @mut int = @mut 5i;
100-
let b: @mut int = a.clone();
101-
assert!(a == b);
102-
*b = 10;
93+
let a : @int = @5i;
94+
let b : @int = a.clone();
10395
assert!(a == b);
10496
}

branches/auto/src/libcore/hash.rs

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,43 +76,51 @@ pub trait Streaming {
7676
impl<A:IterBytes> Hash for A {
7777
#[inline(always)]
7878
fn hash_keyed(&self, k0: u64, k1: u64) -> u64 {
79-
let s = &State(k0, k1);
80-
for self.iter_bytes(true) |bytes| {
81-
s.input(bytes);
79+
unsafe {
80+
let s = &State(k0, k1);
81+
for self.iter_bytes(true) |bytes| {
82+
s.input(bytes);
83+
}
84+
s.result_u64()
8285
}
83-
s.result_u64()
8486
}
8587
}
8688

8789
fn hash_keyed_2<A: IterBytes,
8890
B: IterBytes>(a: &A, b: &B, k0: u64, k1: u64) -> u64 {
89-
let s = &State(k0, k1);
90-
for a.iter_bytes(true) |bytes| { s.input(bytes); }
91-
for b.iter_bytes(true) |bytes| { s.input(bytes); }
92-
s.result_u64()
91+
unsafe {
92+
let s = &State(k0, k1);
93+
for a.iter_bytes(true) |bytes| { s.input(bytes); }
94+
for b.iter_bytes(true) |bytes| { s.input(bytes); }
95+
s.result_u64()
96+
}
9397
}
9498

9599
fn hash_keyed_3<A: IterBytes,
96100
B: IterBytes,
97101
C: IterBytes>(a: &A, b: &B, c: &C, k0: u64, k1: u64) -> u64 {
98-
let s = &State(k0, k1);
99-
for a.iter_bytes(true) |bytes| { s.input(bytes); }
100-
for b.iter_bytes(true) |bytes| { s.input(bytes); }
101-
for c.iter_bytes(true) |bytes| { s.input(bytes); }
102-
s.result_u64()
102+
unsafe {
103+
let s = &State(k0, k1);
104+
for a.iter_bytes(true) |bytes| { s.input(bytes); }
105+
for b.iter_bytes(true) |bytes| { s.input(bytes); }
106+
for c.iter_bytes(true) |bytes| { s.input(bytes); }
107+
s.result_u64()
108+
}
103109
}
104110

105111
fn hash_keyed_4<A: IterBytes,
106112
B: IterBytes,
107113
C: IterBytes,
108114
D: IterBytes>(a: &A, b: &B, c: &C, d: &D, k0: u64, k1: u64)
109115
-> u64 {
110-
let s = &State(k0, k1);
111-
for a.iter_bytes(true) |bytes| { s.input(bytes); }
112-
for b.iter_bytes(true) |bytes| { s.input(bytes); }
113-
for c.iter_bytes(true) |bytes| { s.input(bytes); }
114-
for d.iter_bytes(true) |bytes| { s.input(bytes); }
115-
s.result_u64()
116+
unsafe {
117+
let s = &State(k0, k1);
118+
for a.iter_bytes(true) |bytes| { s.input(bytes); }
119+
for b.iter_bytes(true) |bytes| { s.input(bytes); }
120+
for c.iter_bytes(true) |bytes| { s.input(bytes); }
121+
for d.iter_bytes(true) |bytes| { s.input(bytes); }
122+
s.result_u64()
123+
}
116124
}
117125

118126
fn hash_keyed_5<A: IterBytes,
@@ -121,13 +129,15 @@ fn hash_keyed_5<A: IterBytes,
121129
D: IterBytes,
122130
E: IterBytes>(a: &A, b: &B, c: &C, d: &D, e: &E,
123131
k0: u64, k1: u64) -> u64 {
124-
let s = &State(k0, k1);
125-
for a.iter_bytes(true) |bytes| { s.input(bytes); }
126-
for b.iter_bytes(true) |bytes| { s.input(bytes); }
127-
for c.iter_bytes(true) |bytes| { s.input(bytes); }
128-
for d.iter_bytes(true) |bytes| { s.input(bytes); }
129-
for e.iter_bytes(true) |bytes| { s.input(bytes); }
130-
s.result_u64()
132+
unsafe {
133+
let s = &State(k0, k1);
134+
for a.iter_bytes(true) |bytes| { s.input(bytes); }
135+
for b.iter_bytes(true) |bytes| { s.input(bytes); }
136+
for c.iter_bytes(true) |bytes| { s.input(bytes); }
137+
for d.iter_bytes(true) |bytes| { s.input(bytes); }
138+
for e.iter_bytes(true) |bytes| { s.input(bytes); }
139+
s.result_u64()
140+
}
131141
}
132142

133143
// Implement State as SipState

branches/auto/src/libcore/num/f32.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ impl num::ToStrRadix for f32 {
507507
#[inline(always)]
508508
pub fn from_str(num: &str) -> Option<f32> {
509509
strconv::from_str_common(num, 10u, true, true, true,
510-
strconv::ExpDec, false, false)
510+
strconv::ExpDec, false)
511511
}
512512

513513
/**
@@ -540,7 +540,7 @@ pub fn from_str(num: &str) -> Option<f32> {
540540
#[inline(always)]
541541
pub fn from_str_hex(num: &str) -> Option<f32> {
542542
strconv::from_str_common(num, 16u, true, true, true,
543-
strconv::ExpBin, false, false)
543+
strconv::ExpBin, false)
544544
}
545545

546546
/**
@@ -565,7 +565,7 @@ pub fn from_str_hex(num: &str) -> Option<f32> {
565565
#[inline(always)]
566566
pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
567567
strconv::from_str_common(num, rdx, true, true, false,
568-
strconv::ExpNone, false, false)
568+
strconv::ExpNone, false)
569569
}
570570

571571
impl from_str::FromStr for f32 {

branches/auto/src/libcore/num/f64.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ impl num::ToStrRadix for f64 {
529529
#[inline(always)]
530530
pub fn from_str(num: &str) -> Option<f64> {
531531
strconv::from_str_common(num, 10u, true, true, true,
532-
strconv::ExpDec, false, false)
532+
strconv::ExpDec, false)
533533
}
534534

535535
/**
@@ -562,7 +562,7 @@ pub fn from_str(num: &str) -> Option<f64> {
562562
#[inline(always)]
563563
pub fn from_str_hex(num: &str) -> Option<f64> {
564564
strconv::from_str_common(num, 16u, true, true, true,
565-
strconv::ExpBin, false, false)
565+
strconv::ExpBin, false)
566566
}
567567

568568
/**
@@ -587,7 +587,7 @@ pub fn from_str_hex(num: &str) -> Option<f64> {
587587
#[inline(always)]
588588
pub fn from_str_radix(num: &str, rdx: uint) -> Option<f64> {
589589
strconv::from_str_common(num, rdx, true, true, false,
590-
strconv::ExpNone, false, false)
590+
strconv::ExpNone, false)
591591
}
592592

593593
impl from_str::FromStr for f64 {

branches/auto/src/libcore/num/float.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl num::ToStrRadix for float {
242242
#[inline(always)]
243243
pub fn from_str(num: &str) -> Option<float> {
244244
strconv::from_str_common(num, 10u, true, true, true,
245-
strconv::ExpDec, false, false)
245+
strconv::ExpDec, false)
246246
}
247247
248248
/**
@@ -275,7 +275,7 @@ pub fn from_str(num: &str) -> Option<float> {
275275
#[inline(always)]
276276
pub fn from_str_hex(num: &str) -> Option<float> {
277277
strconv::from_str_common(num, 16u, true, true, true,
278-
strconv::ExpBin, false, false)
278+
strconv::ExpBin, false)
279279
}
280280
281281
/**
@@ -300,7 +300,7 @@ pub fn from_str_hex(num: &str) -> Option<float> {
300300
#[inline(always)]
301301
pub fn from_str_radix(num: &str, radix: uint) -> Option<float> {
302302
strconv::from_str_common(num, radix, true, true, false,
303-
strconv::ExpNone, false, false)
303+
strconv::ExpNone, false)
304304
}
305305
306306
impl from_str::FromStr for float {

branches/auto/src/libcore/num/int-template.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,21 +202,21 @@ impl ops::Neg<T> for T {
202202
#[inline(always)]
203203
pub fn from_str(s: &str) -> Option<T> {
204204
strconv::from_str_common(s, 10u, true, false, false,
205-
strconv::ExpNone, false, false)
205+
strconv::ExpNone, false)
206206
}
207207
208208
/// Parse a string as a number in the given base.
209209
#[inline(always)]
210210
pub fn from_str_radix(s: &str, radix: uint) -> Option<T> {
211211
strconv::from_str_common(s, radix, true, false, false,
212-
strconv::ExpNone, false, false)
212+
strconv::ExpNone, false)
213213
}
214214
215215
/// Parse a byte slice as a number in the given base.
216216
#[inline(always)]
217217
pub fn parse_bytes(buf: &[u8], radix: uint) -> Option<T> {
218218
strconv::from_str_bytes_common(buf, radix, true, false, false,
219-
strconv::ExpNone, false, false)
219+
strconv::ExpNone, false)
220220
}
221221
222222
impl FromStr for T {

0 commit comments

Comments
 (0)