Skip to content

Commit f38ca0b

Browse files
committed
Merge pull request rust-lang#1 from nikomatsakis/dk-broken-branch
Dk broken branch
2 parents 692aea1 + e4077dc commit f38ca0b

File tree

943 files changed

+21320
-18125
lines changed

Some content is hidden

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

943 files changed

+21320
-18125
lines changed

AUTHORS.txt

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Benjamin Jackman <[email protected]>
1919
Benjamin Kircher <[email protected]>
2020
Brendan Eich <[email protected]>
2121
Brian Anderson <[email protected]>
22+
Brian J. Burg <[email protected]>
2223
Chris Double <[email protected]>
2324
Chris Peterson <[email protected]>
2425
Damian Gryski <[email protected]>
@@ -29,6 +30,8 @@ Daniel Patterson <[email protected]>
2930
Dave Herman <[email protected]>
3031
David Rajchenbach-Teller <[email protected]>
3132
Donovan Preston <[email protected]>
33+
Drew Willcoxon <[email protected]>
34+
Elliott Slaughter <[email protected]>
3235
Elly Fong-Jones <[email protected]>
3336
Eric Holk <[email protected]>
3437
Erick Tryzelaar <[email protected]>
@@ -77,6 +80,7 @@ Patrick Walton <[email protected]>
7780
Patrik Kårlin <[email protected]>
7881
Paul Stansifer <[email protected]>
7982
Peter Hull <[email protected]>
83+
Philipp Brüschweiler <[email protected]>
8084
Rafael Ávila de Espíndola <[email protected]>
8185
Ralph Giles <[email protected]>
8286
Reuben Morais <[email protected]>

Makefile.in

+13-2
Original file line numberDiff line numberDiff line change
@@ -355,18 +355,29 @@ endif
355355
# Add RUSTFLAGS_STAGEN values to the build command
356356
EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
357357

358+
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
359+
360+
# Pass --cfg stage0 only for the build->host part of stage0;
361+
# if you're building a cross config, the host->* parts are
362+
# effectively stage1, since it uses the just-built stage0.
363+
ifeq ($(1),0)
364+
ifneq ($(strip $(CFG_HOST_TRIPLE)),$(strip $(3)))
365+
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
366+
endif
367+
endif
368+
358369
STAGE$(1)_T_$(2)_H_$(3) := \
359370
$$(Q)$$(call CFG_RUN_TARG,$(1), \
360371
$$(CFG_VALGRIND_COMPILE$(1)) \
361372
$$(HBIN$(1)_H_$(3))/rustc$$(X) \
362-
--cfg stage$(1) \
373+
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
363374
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2))
364375

365376
PERF_STAGE$(1)_T_$(2)_H_$(3) := \
366377
$$(Q)$$(call CFG_RUN_TARG,$(1), \
367378
$$(CFG_PERF_TOOL) \
368379
$$(HBIN$(1)_H_$(3))/rustc$$(X) \
369-
--cfg stage$(1) \
380+
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
370381
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2))
371382

372383
endef

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ an earlier state of development). As such, source builds require that:
1717

1818
* Windows (7, server 2008 r2) x86 only
1919
* Linux 2.6.x (various distributions) x86 and x86-64
20-
* OSX 10.6 ("Snow leopard") or 10.7 ("Lion") x86 and x86-64
20+
* OSX 10.6 ("Snow Leopard") or 10.7 ("Lion") x86 and x86-64
2121

2222
You may find other platforms work, but these are our "tier 1" supported build
2323
environments that are most likely to work. Further platforms will be added to
@@ -34,8 +34,8 @@ To build from source you will also need the following prerequisite packages:
3434
Assuming you're on a relatively modern Linux/OSX system and have met the
3535
prerequisites, something along these lines should work:
3636

37-
$ tar -xzf rust-0.3.tar.gz
38-
$ cd rust-0.3
37+
$ tar -xzf rust-0.4.tar.gz
38+
$ cd rust-0.4
3939
$ ./configure
4040
$ make && make install
4141

@@ -59,10 +59,10 @@ information on them.
5959
Rust is primarily distributed under the terms of the MIT license, with
6060
portions covered by various BSD-like licenses.
6161

62-
See LICENSE.txt for complete terms of copyright and redistribution.
63-
62+
See LICENSE.txt for details.
6463

6564
## More help
6665

67-
The [tutorial](http://dl.rust-lang.org/doc/tutorial.html) is a good
68-
starting point.
66+
The [tutorial] is a good starting point.
67+
68+
[tutorial]: http://dl.rust-lang.org/doc/tutorial.html

RELEASES.txt

+57
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1+
Version 0.4 (September 2012)
2+
----------------------------
3+
4+
* ~1500 changes, numerous bugfixes
5+
6+
* Syntax
7+
* All keywords are now strict and may not be used as identifiers anywhere
8+
* Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
9+
'of', 'with', 'to', 'class'.
10+
* Classes are replaced with simpler structs
11+
* Method self types
12+
* `ret` became `return` and `alt` became `match`
13+
* `import` is now `use`; `use is now `extern mod`
14+
* `extern mod { ... }` is now `extern { ... }`
15+
* `use mod` is the recommended way to import modules
16+
* `pub` and `priv` replace deprecated export lists
17+
* The syntax of `match` pattern arms now uses fat arrow (=>)
18+
19+
* Semantics
20+
* Trait implementations are now coherent, ala Haskell typeclasses
21+
* Trait methods may be static
22+
* Argument modes are deprecated
23+
* Borrowed pointers are much more mature and recommended for use
24+
* Strings and vectors in the static region are stored in constant memory
25+
* Typestate was removed
26+
* Resolution rewritten to be more reliable
27+
* Support for 'dual-mode' data structures (freezing and thawing)
28+
* Last-use analysis is only used for warnings now. Moves must be explicit
29+
for lvalues (TODO: confirm)
30+
31+
* Libraries
32+
* Most binary operators can now be overloaded via the traits in
33+
`core::ops'
34+
* `std::net::url` for representing URLs
35+
* Sendable hash maps in `core::send_map`
36+
* `core::task' gained a (currently very unsafe) task-local storage API
37+
38+
* Concurrency
39+
* An efficient new intertask communication primitive called the pipe,
40+
along with a number of higher-level channel types, in `core::pipes`
41+
* `std::arc`, an atomically reference counted, immutable, shared memory
42+
type
43+
* `std::sync`, various exotic synchronization tools based on arcs and pipes
44+
* Futures are now based on pipes and sendable
45+
* More robust linked task failure
46+
* Improved task builder API
47+
48+
* Other
49+
* Improved error reporting
50+
* Preliminary JIT support
51+
* Preliminary work on precise GC
52+
* Extensive architectural improvements to rustc
53+
* Begun a transition away from buggy C++-based reflection (shape) code to
54+
Rust-based (visitor) code
55+
* Hash functions improved across the codebase (TODO: need details)
56+
* New lint checks (TODO: which?)
57+
158
Version 0.3 (July 2012)
259
------------------------
360

configure

+5-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ then
400400
| cut -d ' ' -f 2)
401401

402402
case $CFG_CLANG_VERSION in
403-
(3.0svn | 3.0 | 3.1 | 4.0)
403+
(3.0svn | 3.0 | 3.1 | 4.0 | 4.1)
404404
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
405405
CFG_C_COMPILER="clang"
406406
;;
@@ -505,6 +505,10 @@ do
505505
make_dir $h/test/perf
506506
make_dir $h/test/pretty
507507
make_dir $h/test/doc-tutorial
508+
make_dir $h/test/doc-tutorial-ffi
509+
make_dir $h/test/doc-tutorial-macros
510+
make_dir $h/test/doc-tutorial-borrowed-ptr
511+
make_dir $h/test/doc-tutorial-tasks
508512
make_dir $h/test/doc-ref
509513
done
510514

doc/lib/codemirror-rust.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ CodeMirror.defineMode("rust", function() {
22
var indentUnit = 4, altIndentUnit = 2;
33
var valKeywords = {
44
"if": "if-style", "while": "if-style", "loop": "if-style", "else": "else-style",
5-
"do": "else-style", "ret": "else-style", "fail": "else-style",
5+
"do": "else-style", "return": "else-style", "fail": "else-style",
66
"break": "atom", "cont": "atom", "const": "let", "resource": "fn",
7-
"let": "let", "fn": "fn", "for": "for", "alt": "alt", "trait": "trait",
8-
"impl": "impl", "type": "type", "enum": "enum", "class": "atom", "mod": "mod",
7+
"let": "let", "fn": "fn", "for": "for", "match": "match", "trait": "trait",
8+
"impl": "impl", "type": "type", "enum": "enum", "struct": "atom", "mod": "mod",
99
"as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op",
1010
"claim": "op", "extern": "ignore", "unsafe": "ignore", "import": "else-style",
11-
"export": "else-style", "copy": "op", "log": "op", "log_err": "op",
12-
"use": "op", "bind": "op", "self": "atom", "new": "atom"
11+
"export": "else-style", "copy": "op", "log": "op",
12+
"use": "op", "self": "atom"
1313
};
1414
var typeKeywords = function() {
1515
var keywords = {"fn": "fn"};
@@ -197,7 +197,7 @@ CodeMirror.defineMode("rust", function() {
197197
if (type == "if-style") return cont(expression, expression);
198198
if (type == "else-style" || type == "op") return cont(expression);
199199
if (type == "for") return cont(pattern, maybetype, inop, expression, expression);
200-
if (type == "alt") return cont(expression, altbody);
200+
if (type == "match") return cont(expression, altbody);
201201
if (type == "fn") return cont(fndef);
202202
if (type == "macro") return cont(macro);
203203
return cont();
@@ -346,7 +346,7 @@ CodeMirror.defineMode("rust", function() {
346346
else return pass();
347347
}
348348
function altbody(type) {
349-
if (type == "{") return cont(pushlex("}", "alt"), altblock1, poplex);
349+
if (type == "{") return cont(pushlex("}", "match"), altblock1, poplex);
350350
return pass();
351351
}
352352
function altblock1(type) {
@@ -357,7 +357,7 @@ CodeMirror.defineMode("rust", function() {
357357
return pass(pattern, altblock2);
358358
}
359359
function altblock2(type) {
360-
if (type == "{") return cont(pushlex("}", "alt"), block, poplex, altblock1);
360+
if (type == "{") return cont(pushlex("}", "match"), block, poplex, altblock1);
361361
else return pass(altblock1);
362362
}
363363

@@ -422,7 +422,7 @@ CodeMirror.defineMode("rust", function() {
422422
type = lexical.type, closing = firstChar == type;
423423
if (type == "stat") return lexical.indented + indentUnit;
424424
if (lexical.align) return lexical.column + (closing ? 0 : 1);
425-
return lexical.indented + (closing ? 0 : (lexical.info == "alt" ? altIndentUnit : indentUnit));
425+
return lexical.indented + (closing ? 0 : (lexical.info == "match" ? altIndentUnit : indentUnit));
426426
},
427427

428428
electricChars: "{}"

doc/rust.css

+18-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,21 @@ blockquote {
8181
border-left: solid 1px silver;
8282
margin: 1em;
8383
padding: 0.5em 1em 0.5em 1em;
84-
}
84+
}
85+
86+
/* Make the table under the tutorial's 'Types' section look nicer */
87+
table {
88+
border-top: 1px solid silver;
89+
border-bottom: 1px solid silver;
90+
padding: 0.8em;
91+
font-size: smaller;
92+
}
93+
/* Also for the benefit of the type table */
94+
td {
95+
padding-right: 1em;
96+
}
97+
98+
/* Only display one level of hierarchy in the TOC */
99+
#TOC ul ul {
100+
display: none;
101+
}

0 commit comments

Comments
 (0)