Skip to content

Commit 47f8b6a

Browse files
garethgareth
authored andcommitted
---
yaml --- r: 71931 b: refs/heads/dist-snap c: 995d444 h: refs/heads/master i: 71929: 6aca115 71927: 1a1d008 v: v3
1 parent 9c9e964 commit 47f8b6a

File tree

165 files changed

+2475
-4777
lines changed

Some content is hidden

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

165 files changed

+2475
-4777
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 62c94d3a38985f5f6f12920d14867e73a19fefe2
10+
refs/heads/dist-snap: 995d44416b203b5b3ba619250ff8effdcf205049
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.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/dist-snap/configure

Lines changed: 2 additions & 2 deletions
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
(*)
@@ -859,7 +859,7 @@ do
859859
LDFLAGS=$LLVM_LDFLAGS
860860

861861
LLVM_FLAGS="$LLVM_TARGETS $LLVM_OPTS $LLVM_BUILD \
862-
$LLVM_HOST $LLVM_TARGET --with-python=$CFG_PYTHON"
862+
$LLVM_HOST $LLVM_TARGET"
863863

864864
msg "configuring LLVM with:"
865865
msg "$LLVM_FLAGS"

branches/dist-snap/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/dist-snap/doc/tutorial.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,7 @@ 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.
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.
498+
types. Assuming that `(float, float)` is a tuple of two floats:
503499

504500
~~~~
505501
fn angle(vector: (float, float)) -> float {
@@ -751,7 +747,7 @@ fn area(sh: Shape) -> float {
751747

752748
Tuples in Rust behave exactly like structs, except that their fields
753749
do not have names. Thus, you cannot access their fields with dot notation.
754-
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
755751
unit, `()`, as the empty tuple if you like).
756752

757753
~~~~
@@ -2324,7 +2320,7 @@ impl Shape for CircleStruct {
23242320
Notice that methods of `Circle` can call methods on `Shape`, as our
23252321
`radius` implementation calls the `area` method.
23262322
This is a silly way to compute the radius of a circle
2327-
(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.
23282324

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

branches/dist-snap/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/dist-snap/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/dist-snap/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-pre");
21-
extern mod std(vers = "0.7-pre");
20+
extern mod core(vers = "0.6");
21+
extern mod std(vers = "0.6");
2222

2323
use core::*;
2424

branches/dist-snap/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-pre");
12+
extern mod core(vers = "0.6");
1313

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

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

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

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

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

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

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

branches/dist-snap/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-pre" 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/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/src/libcore/container.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ pub trait Map<K, V>: Mutable {
2929
/// Return true if the map contains a value for the specified key
3030
fn contains_key(&self, key: &K) -> bool;
3131

32-
// Visits all keys and values
33-
fn each(&self, f: &fn(&K, &V) -> bool);
34-
3532
/// Visit all keys
3633
fn each_key(&self, f: &fn(&K) -> bool);
3734

branches/dist-snap/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-pre",
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-pre");
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)