Skip to content

Commit 38b6d19

Browse files
author
Bryan Dunsmore
committed
---
yaml --- r: 56011 b: refs/heads/auto c: 08bc392 h: refs/heads/master i: 56009: a4af56f 56007: a5794de v: v3
1 parent 92d6149 commit 38b6d19

Some content is hidden

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

95 files changed

+1589
-2282
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: 72228012343db793ff453b7cf038d973ccac61a7
17+
refs/heads/auto: 08bc392d94726fb04154ce3993c3d519e480b24b
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/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ then
533533
LLVM_VERSION=$($LLVM_CONFIG --version)
534534

535535
case $LLVM_VERSION in
536-
(3.3|3.3svn|3.2|3.2svn)
536+
(3.2svn|3.2|3.1svn|3.1|3.0svn|3.0)
537537
msg "found ok version of LLVM: $LLVM_VERSION"
538538
;;
539539
(*)

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: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ omitted.
495495

496496
A powerful application of pattern matching is *destructuring*:
497497
matching in order to bind names to the contents of data
498-
types. Assuming that `(float, float)` is a tuple of two floats:
498+
types.
499+
500+
> ***Note:*** The following code makes use of tuples (`(float, float)`) which
501+
> are explained in section 5.3. For now you can think of tuples as a list of
502+
> items.
499503
500504
~~~~
501505
fn angle(vector: (float, float)) -> float {
@@ -747,7 +751,7 @@ fn area(sh: Shape) -> float {
747751

748752
Tuples in Rust behave exactly like structs, except that their fields
749753
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
754+
Tuples can have any arity except for 0 or 1 (though you may consider
751755
unit, `()`, as the empty tuple if you like).
752756

753757
~~~~
@@ -2320,7 +2324,7 @@ impl Shape for CircleStruct {
23202324
Notice that methods of `Circle` can call methods on `Shape`, as our
23212325
`radius` implementation calls the `area` method.
23222326
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.
2327+
(since we could just return the `circle` field), but you get the idea.
23242328

23252329
In type-parameterized functions,
23262330
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/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.7-rc");
21-
extern mod std(vers = "0.7-rc");
20+
extern mod core(vers = "0.6");
21+
extern mod std(vers = "0.6");
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.7-rc");
12+
extern mod core(vers = "0.6");
1313

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

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

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

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

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

2929
#[cfg(rustc)]
30-
extern mod this(name = "rustc", vers = "0.7-rc");
30+
extern mod this(name = "rustc", vers = "0.6");
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.7-rc" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.6" 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: 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/cmp.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,32 +64,14 @@ totaleq_impl!(i64)
6464
totaleq_impl!(int)
6565
totaleq_impl!(uint)
6666

67-
#[deriving(Clone, Eq)]
68-
pub enum Ordering { Less = -1, Equal = 0, Greater = 1 }
67+
#[deriving(Eq)]
68+
pub enum Ordering { Less, Equal, Greater }
6969

7070
/// Trait for types that form a total order
7171
pub trait TotalOrd: TotalEq {
7272
fn cmp(&self, other: &Self) -> Ordering;
7373
}
7474

75-
impl TotalOrd for Ordering {
76-
#[inline(always)]
77-
fn cmp(&self, other: &Ordering) -> Ordering {
78-
(*self as int).cmp(&(*other as int))
79-
}
80-
}
81-
82-
impl Ord for Ordering {
83-
#[inline(always)]
84-
fn lt(&self, other: &Ordering) -> bool { (*self as int) < (*other as int) }
85-
#[inline(always)]
86-
fn le(&self, other: &Ordering) -> bool { (*self as int) <= (*other as int) }
87-
#[inline(always)]
88-
fn gt(&self, other: &Ordering) -> bool { (*self as int) > (*other as int) }
89-
#[inline(always)]
90-
fn ge(&self, other: &Ordering) -> bool { (*self as int) >= (*other as int) }
91-
}
92-
9375
macro_rules! totalord_impl(
9476
($t:ty) => {
9577
impl TotalOrd for $t {
@@ -198,10 +180,4 @@ mod test {
198180
assert!(5.equals(&5));
199181
assert!(!2.equals(&17));
200182
}
201-
202-
#[test]
203-
fn test_ordering_order() {
204-
assert!(Less < Equal);
205-
assert_eq!(Greater.cmp(&Less), Greater);
206-
}
207183
}

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.7-rc",
51+
vers = "0.6",
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.7-rc");
69+
#[cfg(test)] extern mod realcore(name = "core", vers = "0.6");
7070
#[cfg(test)] pub use kinds = realcore::kinds;
7171
#[cfg(test)] pub use ops = realcore::ops;
7272
#[cfg(test)] pub use cmp = realcore::cmp;

0 commit comments

Comments
 (0)