Skip to content

Commit 1bbe313

Browse files
committed
---
yaml --- r: 71935 b: refs/heads/dist-snap c: 8158dd7 h: refs/heads/master i: 71933: 574f468 71931: 47f8b6a 71927: 1a1d008 71919: d80959c 71903: ca43ca0 71871: f75782e 71807: cac9a21 71679: 4addab6 v: v3
1 parent 1923158 commit 1bbe313

File tree

197 files changed

+4225
-8634
lines changed

Some content is hidden

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

197 files changed

+4225
-8634
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: b3b8c0502bb7d223b4da50f3eac2c1ad51cf6c72
10+
refs/heads/dist-snap: 8158dd7e9a3469b8c0946035b457a953faf29d99
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 & 39 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
~~~~
@@ -1071,28 +1067,6 @@ let mut d = @mut 5; // mutable variable, mutable box
10711067
d = @mut 15;
10721068
~~~~
10731069

1074-
A mutable variable and an immutable variable can refer to the same box, given
1075-
that their types are compatible. Mutability of a box is a property of its type,
1076-
however, so for example a mutable handle to an immutable box cannot be
1077-
assigned a reference to a mutable box.
1078-
1079-
~~~~
1080-
let a = @1; // immutable box
1081-
let b = @mut 2; // mutable box
1082-
1083-
let mut c : @int; // declare a variable with type managed immutable int
1084-
let mut d : @mut int; // and one of type managed mutable int
1085-
1086-
c = a; // box type is the same, okay
1087-
d = b; // box type is the same, okay
1088-
~~~~
1089-
1090-
~~~~ {.xfail-test}
1091-
// but b cannot be assigned to c, or a to d
1092-
c = b; // error
1093-
~~~~
1094-
1095-
10961070
# Move semantics
10971071

10981072
Rust uses a shallow copy for parameter passing, assignment and returning values
@@ -1107,16 +1081,6 @@ let y = x.clone(); // y is a newly allocated box
11071081
let z = x; // no new memory allocated, x can no longer be used
11081082
~~~~
11091083

1110-
Since in owned boxes mutability is a property of the owner, not the
1111-
box, mutable boxes may become immutable when they are moved, and vice-versa.
1112-
1113-
~~~~
1114-
let r = ~13;
1115-
let mut s = r; // box becomes mutable
1116-
*s += 1;
1117-
let t = s; // box becomes immutable
1118-
~~~~
1119-
11201084
# Borrowed pointers
11211085

11221086
Rust's borrowed pointers are a general purpose reference type. In contrast with
@@ -2324,7 +2288,7 @@ impl Shape for CircleStruct {
23242288
Notice that methods of `Circle` can call methods on `Shape`, as our
23252289
`radius` implementation calls the `area` method.
23262290
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.
2291+
(since we could just return the `circle` field), but you get the idea.
23282292

23292293
In type-parameterized functions,
23302294
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/bool.rs

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

11+
1112
//! Boolean logic
1213
13-
#[cfg(notest)]
14-
use cmp::{Eq, Ord, TotalOrd, Ordering};
1514
use option::{None, Option, Some};
1615
use from_str::FromStr;
1716

17+
#[cfg(notest)] use cmp;
18+
1819
/// Negation / inverse
1920
pub fn not(v: bool) -> bool { !v }
2021

@@ -72,86 +73,40 @@ pub fn all_values(blk: &fn(v: bool)) {
7273
}
7374

7475
/// converts truth value to an 8 bit byte
75-
#[inline(always)]
7676
pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
7777

7878
#[cfg(notest)]
79-
impl Ord for bool {
80-
#[inline(always)]
81-
fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) }
82-
#[inline(always)]
83-
fn le(&self, other: &bool) -> bool { to_bit(*self) <= to_bit(*other) }
84-
#[inline(always)]
85-
fn gt(&self, other: &bool) -> bool { to_bit(*self) > to_bit(*other) }
86-
#[inline(always)]
87-
fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) }
88-
}
89-
90-
#[cfg(notest)]
91-
impl TotalOrd for bool {
92-
#[inline(always)]
93-
fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) }
94-
}
95-
96-
#[cfg(notest)]
97-
impl Eq for bool {
98-
#[inline(always)]
79+
impl cmp::Eq for bool {
9980
fn eq(&self, other: &bool) -> bool { (*self) == (*other) }
100-
#[inline(always)]
10181
fn ne(&self, other: &bool) -> bool { (*self) != (*other) }
10282
}
10383

104-
#[cfg(test)]
105-
mod tests {
106-
use super::*;
107-
use prelude::*;
84+
#[test]
85+
pub fn test_bool_from_str() {
86+
use from_str::FromStr;
10887

109-
#[test]
110-
fn test_bool_from_str() {
111-
use from_str::FromStr;
112-
113-
do all_values |v| {
114-
assert!(Some(v) == FromStr::from_str(to_str(v)))
115-
}
88+
do all_values |v| {
89+
assert!(Some(v) == FromStr::from_str(to_str(v)))
11690
}
91+
}
11792

118-
#[test]
119-
fn test_bool_to_str() {
120-
assert!(to_str(false) == ~"false");
121-
assert!(to_str(true) == ~"true");
122-
}
123-
124-
#[test]
125-
fn test_bool_to_bit() {
126-
do all_values |v| {
127-
assert!(to_bit(v) == if is_true(v) { 1u8 } else { 0u8 });
128-
}
129-
}
130-
131-
#[test]
132-
fn test_bool_ord() {
133-
assert!(true > false);
134-
assert!(!(false > true));
135-
136-
assert!(false < true);
137-
assert!(!(true < false));
138-
139-
assert!(false <= false);
140-
assert!(false >= false);
141-
assert!(true <= true);
142-
assert!(true >= true);
143-
144-
assert!(false <= true);
145-
assert!(!(false >= true));
146-
assert!(true >= false);
147-
assert!(!(true <= false));
148-
}
93+
#[test]
94+
pub fn test_bool_to_str() {
95+
assert!(to_str(false) == ~"false");
96+
assert!(to_str(true) == ~"true");
97+
}
14998

150-
#[test]
151-
fn test_bool_totalord() {
152-
assert_eq!(true.cmp(&true), Equal);
153-
assert_eq!(false.cmp(&false), Equal);
154-
assert_eq!(true.cmp(&false), Greater);
155-
assert_eq!(false.cmp(&true), Less);
99+
#[test]
100+
pub fn test_bool_to_bit() {
101+
do all_values |v| {
102+
assert!(to_bit(v) == if is_true(v) { 1u8 } else { 0u8 });
156103
}
157104
}
105+
106+
// Local Variables:
107+
// mode: rust;
108+
// fill-column: 78;
109+
// indent-tabs-mode: nil
110+
// c-basic-offset: 4
111+
// buffer-file-coding-system: utf-8-unix
112+
// End:

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

0 commit comments

Comments
 (0)