Skip to content

Commit c0bc99e

Browse files
committed
---
yaml --- r: 55995 b: refs/heads/auto c: 23251b2 h: refs/heads/master i: 55993: 9226c76 55991: 085407e v: v3
1 parent 3762574 commit c0bc99e

Some content is hidden

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

59 files changed

+768
-768
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: 3e67085d7a590ef360e7c85cc6c3931bae6df6a5
17+
refs/heads/auto: 23251b24389c68dd01ac26dbaa30125aa8f64c35
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 = git://github.com/brson/llvm.git
3+
url = https://github.com/brson/llvm.git
44
[submodule "src/libuv"]
55
path = src/libuv
6-
url = git://github.com/brson/libuv.git
6+
url = https://github.com/brson/libuv.git

branches/auto/doc/rust.md

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

16541654
### Tuple expressions
16551655

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

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

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

25832584
The members of a tuple are laid out in memory contiguously, like a record, in
25842585
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 or 1 (though you may consider
750+
Tuples can have any arity except for 0 (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 `circle` field), but you get the idea.
2323+
(since we could just return the `radius` 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 licensed under MIT-like terms. See \fBLICENSE.txt\fR
174-
in the rust source distribution.
173+
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR
174+
file in the rust source distribution.

branches/auto/mk/dist.mk

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

branches/auto/src/compiletest/compiletest.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#[allow(deprecated_mode)];
1818
#[allow(deprecated_pattern)];
1919

20-
extern mod core(vers = "0.6");
21-
extern mod std(vers = "0.6");
20+
extern mod core(vers = "0.7-rc");
21+
extern mod std(vers = "0.7-rc");
2222

2323
use core::*;
2424

branches/auto/src/driver/driver.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@
99
// except according to those terms.
1010

1111
#[no_core];
12-
extern mod core(vers = "0.6");
12+
extern mod core(vers = "0.7-rc");
1313

1414
#[cfg(rustpkg)]
15-
extern mod this(name = "rustpkg", vers = "0.6");
15+
extern mod this(name = "rustpkg", vers = "0.7-rc");
1616

1717
#[cfg(fuzzer)]
18-
extern mod this(name = "fuzzer", vers = "0.6");
18+
extern mod this(name = "fuzzer", vers = "0.7-rc");
1919

2020
#[cfg(rustdoc)]
21-
extern mod this(name = "rustdoc", vers = "0.6");
21+
extern mod this(name = "rustdoc", vers = "0.7-rc");
2222

2323
#[cfg(rusti)]
24-
extern mod this(name = "rusti", vers = "0.6");
24+
extern mod this(name = "rusti", vers = "0.7-rc");
2525

2626
#[cfg(rust)]
27-
extern mod this(name = "rust", vers = "0.6");
27+
extern mod this(name = "rust", vers = "0.7-rc");
2828

2929
#[cfg(rustc)]
30-
extern mod this(name = "rustc", vers = "0.6");
30+
extern mod this(name = "rustc", vers = "0.7-rc");
3131

3232
fn main() { this::main() }

branches/auto/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.6" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.7-rc" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ 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 rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
114-
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
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
115118

116119
syn keyword rustTodo contained TODO FIXME XXX NB
117120

@@ -134,6 +137,7 @@ hi def link rustConditional Conditional
134137
hi def link rustIdentifier Identifier
135138
hi def link rustModPath Include
136139
hi def link rustFuncName Function
140+
hi def link rustCommentDoc SpecialComment
137141
hi def link rustComment Comment
138142
hi def link rustMacro Macro
139143
hi def link rustType Type

branches/auto/src/libcore/char.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,10 @@ pub fn escape_unicode(c: char) -> ~str {
202202
else { ('U', 8u) });
203203
assert!(str::len(s) <= pad);
204204
let mut out = ~"\\";
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-
}
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);
211209
out
212210
}
213211

branches/auto/src/libcore/clone.rs

Lines changed: 19 additions & 11 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 pointers or implement `Drop`), so the compiler considers
17+
contain owned boxes 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,32 +23,38 @@ 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.
2627
fn clone(&self) -> Self;
2728
}
2829

2930
impl Clone for () {
31+
/// Return a copy of the value.
3032
#[inline(always)]
3133
fn clone(&self) -> () { () }
3234
}
3335

3436
impl<T:Clone> Clone for ~T {
37+
/// Return a deep copy of the owned box.
3538
#[inline(always)]
3639
fn clone(&self) -> ~T { ~(**self).clone() }
3740
}
3841

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

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

4954
macro_rules! clone_impl(
5055
($t:ty) => {
5156
impl Clone for $t {
57+
/// Return a copy of the value.
5258
#[inline(always)]
5359
fn clone(&self) -> $t { *self }
5460
}
@@ -76,21 +82,23 @@ clone_impl!(char)
7682

7783
#[test]
7884
fn test_owned_clone() {
79-
let a : ~int = ~5i;
80-
let b : ~int = a.clone();
85+
let a: ~int = ~5i;
86+
let b: ~int = a.clone();
8187
assert!(a == b);
8288
}
8389

8490
#[test]
8591
fn test_managed_clone() {
86-
let a : @int = @5i;
87-
let b : @int = a.clone();
92+
let a: @int = @5i;
93+
let b: @int = a.clone();
8894
assert!(a == b);
8995
}
9096

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

branches/auto/src/libcore/core.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ they contained the following prologue:
4848

4949

5050
#[link(name = "core",
51-
vers = "0.6",
51+
vers = "0.7-rc",
5252
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
5353
url = "https://github.com/mozilla/rust/tree/master/src/libcore")];
5454

@@ -66,7 +66,7 @@ they contained the following prologue:
6666
#[allow(deprecated_drop)];
6767

6868
// Make core testable by not duplicating lang items. See #2912
69-
#[cfg(test)] extern mod realcore(name = "core", vers = "0.6");
69+
#[cfg(test)] extern mod realcore(name = "core", vers = "0.7-rc");
7070
#[cfg(test)] pub use kinds = realcore::kinds;
7171
#[cfg(test)] pub use ops = realcore::ops;
7272
#[cfg(test)] pub use cmp = realcore::cmp;

branches/auto/src/libcore/hash.rs

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

8987
fn hash_keyed_2<A: IterBytes,
9088
B: IterBytes>(a: &A, b: &B, k0: u64, k1: u64) -> 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-
}
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()
9793
}
9894

9995
fn hash_keyed_3<A: IterBytes,
10096
B: IterBytes,
10197
C: IterBytes>(a: &A, b: &B, c: &C, k0: u64, k1: u64) -> 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-
}
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()
109103
}
110104

111105
fn hash_keyed_4<A: IterBytes,
112106
B: IterBytes,
113107
C: IterBytes,
114108
D: IterBytes>(a: &A, b: &B, c: &C, d: &D, k0: u64, k1: u64)
115109
-> 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-
}
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()
124116
}
125117

126118
fn hash_keyed_5<A: IterBytes,
@@ -129,15 +121,13 @@ fn hash_keyed_5<A: IterBytes,
129121
D: IterBytes,
130122
E: IterBytes>(a: &A, b: &B, c: &C, d: &D, e: &E,
131123
k0: u64, k1: u64) -> 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-
}
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()
141131
}
142132

143133
// 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)
510+
strconv::ExpDec, false, 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)
543+
strconv::ExpBin, false, 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)
568+
strconv::ExpNone, false, false)
569569
}
570570

571571
impl from_str::FromStr for f32 {

0 commit comments

Comments
 (0)