Skip to content

Commit f484195

Browse files
emberianalexcrichton
authored andcommitted
---
yaml --- r: 109779 b: refs/heads/snap-stage3 c: 308c035 h: refs/heads/master i: 109777: 2dea679 109775: c96bf02 v: v3
1 parent b663c83 commit f484195

File tree

176 files changed

+1104
-1585
lines changed

Some content is hidden

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

176 files changed

+1104
-1585
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 667f82a79b2275a696b21086ddf5148a617fe20a
4+
refs/heads/snap-stage3: 308c03501a9a49d058f2ad76dd17a4e593ce7be7
55
refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ documentation.
55

66
## Quick Start
77

8-
1. Download a [binary installer][installer] for your platform.
8+
1. Download a [binary insaller][installer] for your platform.
99
2. Read the [tutorial].
1010
3. Enjoy!
1111

branches/snap-stage3/mk/dist.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215215
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216216
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217217
dist-install-dir-$(1): PREPARE_CLEAN=true
218-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
218+
dist-install-dir-$(1): prepare-base-dir-$(1)
219219
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
220220
> tmp/dist/manifest-$(1).in
221221
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -224,7 +224,6 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
224224
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
225225
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
226226
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
227-
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
228227
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
229228

230229
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)

branches/snap-stage3/mk/tests.mk

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ $(foreach host,$(CFG_HOST), \
370370
define DEF_TEST_CRATE_RULES
371371
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
372372

373+
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
374+
373375
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
374376
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
375377
@$$(call E, run: $$<)
@@ -501,10 +503,6 @@ CTEST_BUILD_BASE_codegen = codegen
501503
CTEST_MODE_codegen = codegen
502504
CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
503505

504-
# CTEST_DISABLE_$(TEST_GROUP), if set, will cause the test group to be
505-
# disabled and the associated message to be printed as a warning
506-
# during attempts to run those tests.
507-
508506
ifeq ($(CFG_GDB),)
509507
CTEST_DISABLE_debuginfo = "no gdb found"
510508
endif
@@ -517,14 +515,6 @@ ifeq ($(CFG_OSTYPE),apple-darwin)
517515
CTEST_DISABLE_debuginfo = "gdb on darwing needs root"
518516
endif
519517

520-
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
521-
# test group to be disabled *unless* the target is able to build a
522-
# compiler (i.e. when the target triple is in the set of of host
523-
# triples). The associated message will be printed as a warning
524-
# during attempts to run those tests.
525-
526-
CTEST_DISABLE_NONSELFHOST_rpass-full = "run-pass-full suite is unavailable when cross-compiling."
527-
528518
define DEF_CTEST_VARS
529519

530520
# All the per-stage build rules you might want to call from the
@@ -570,7 +560,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
570560
$$(CTEST_TESTARGS)
571561

572562
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
573-
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(2)_H_$(3))
563+
CTEST_DEPS_rpass_full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
574564
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
575565
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
576566
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
@@ -597,28 +587,8 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
597587

598588
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
599589

600-
# CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)
601-
# Goal: leave this variable as empty string if we should run the test.
602-
# Otherwise, set it to the reason we are not running the test.
603-
# (Encoded as a separate variable because GNU make does not have a
604-
# good way to express OR on ifeq commands)
590+
ifeq ($$(CTEST_DISABLE_$(4)),)
605591

606-
ifneq ($$(CTEST_DISABLE_$(4)),)
607-
# Test suite is disabled for all configured targets.
608-
CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_$(4))
609-
else
610-
# else, check if non-self-hosted target (i.e. target not-in hosts) ...
611-
ifeq ($$(findstring $(2),$$(CFG_HOST)),)
612-
# ... if so, then check if this test suite is disabled for non-selfhosts.
613-
ifneq ($$(CTEST_DISABLE_NONSELFHOST_$(4)),)
614-
# Test suite is disabled for this target.
615-
CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_NONSELFHOST_$(4))
616-
endif
617-
endif
618-
# Neither DISABLE nor DISABLE_NONSELFHOST is set ==> okay, run the test.
619-
endif
620-
621-
ifeq ($$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)),)
622592
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
623593
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
624594
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
@@ -630,9 +600,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
630600

631601
else
632602

633-
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)):
603+
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
604+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
605+
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
634606
@$$(call E, run $(4) [$(2)]: $$<)
635-
@$$(call E, warning: tests disabled: $$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)))
607+
@$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4)))
636608
touch $$@
637609

638610
endif

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
#![crate_type = "bin"]
1212
#![feature(phase)]
1313

14-
// we use our own (green) start below; do not link in libnative; issue #13247.
15-
#![no_start]
16-
1714
#![allow(non_camel_case_types)]
1815
#![deny(warnings)]
1916

branches/snap-stage3/src/doc/guide-unsafe.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ asm!(assembly template
294294
);
295295
```
296296

297-
Any use of `asm` is feature gated (requires `#![feature(asm)]` on the
297+
Any use of `asm` is feature gated (requires `#[feature(asm)];` on the
298298
crate to allow) and of course requires an `unsafe` block.
299299

300300
> **Note**: the examples here are given in x86/x86-64 assembly, but all
@@ -306,7 +306,7 @@ The `assembly template` is the only required parameter and must be a
306306
literal string (i.e `""`)
307307

308308
```
309-
#![feature(asm)]
309+
#[feature(asm)];
310310
311311
#[cfg(target_arch = "x86")]
312312
#[cfg(target_arch = "x86_64")]
@@ -334,7 +334,7 @@ Output operands, input operands, clobbers and options are all optional
334334
but you must add the right number of `:` if you skip them:
335335

336336
```
337-
# #![feature(asm)]
337+
# #[feature(asm)];
338338
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
339339
# fn main() { unsafe {
340340
asm!("xor %eax, %eax"
@@ -348,7 +348,7 @@ asm!("xor %eax, %eax"
348348
Whitespace also doesn't matter:
349349

350350
```
351-
# #![feature(asm)]
351+
# #[feature(asm)];
352352
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
353353
# fn main() { unsafe {
354354
asm!("xor %eax, %eax" ::: "eax");
@@ -362,7 +362,7 @@ Input and output operands follow the same format: `:
362362
expressions must be mutable lvalues:
363363

364364
```
365-
# #![feature(asm)]
365+
# #[feature(asm)];
366366
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
367367
fn add(a: int, b: int) -> int {
368368
let mut c = 0;
@@ -390,7 +390,7 @@ compiler not to assume any values loaded into those registers will
390390
stay valid.
391391

392392
```
393-
# #![feature(asm)]
393+
# #[feature(asm)];
394394
# #[cfg(target_arch = "x86")] #[cfg(target_arch = "x86_64")]
395395
# fn main() { unsafe {
396396
// Put the value 0x200 in eax

branches/snap-stage3/src/doc/po/ja/rust.md.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Japanese translations for Rust package
2-
# Copyright (C) 2013-2014 The Rust Project Developers
2+
# Copyright (C) 2013 The Rust Project Developers
33
# This file is distributed under the same license as the Rust package.
44
# Automatically generated, 2013.
55
#
@@ -886,7 +886,7 @@ msgstr ""
886886
#: src/doc/rust.md:2008
887887
#, fuzzy
888888
#| msgid "~~~~ use std::task::spawn;"
889-
msgid "~~~~ {.ignore} #![warn(unstable)]"
889+
msgid "~~~~ {.ignore} #[warn(unstable)];"
890890
msgstr ""
891891
"~~~~\n"
892892
"use std::task::spawn;"

branches/snap-stage3/src/doc/rust.md

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,13 @@ The keywords are the following strings:
206206
as
207207
break
208208
crate
209+
do
209210
else enum extern
210211
false fn for
211212
if impl in
212213
let loop
213214
match mod mut
214-
priv proc pub
215+
priv pub
215216
ref return
216217
self static struct super
217218
true trait type
@@ -2557,12 +2558,12 @@ task in a _failing state_.
25572558

25582559
~~~~ {.ignore}
25592560
# use std::task;
2560-
# task::spawn(proc() {
2561+
# do task::spawn {
25612562
25622563
([1, 2, 3, 4])[0];
25632564
(["a", "b"])[10]; // fails
25642565
2565-
# })
2566+
# }
25662567
~~~~
25672568

25682569
### Unary operator expressions
@@ -3420,21 +3421,8 @@ x = bo(5,7);
34203421

34213422
### Closure types
34223423

3423-
~~~~ {.notrust .ebnf .notation}
3424-
closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
3425-
[ ':' bound-list ] [ '->' type ]
3426-
procedure_type := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
3427-
[ ':' bound-list ] [ '->' type ]
3428-
lifetime-list := lifetime | lifetime ',' lifetime-list
3429-
arg-list := ident ':' type | ident ':' type ',' arg-list
3430-
bound-list := bound | bound '+' bound-list
3431-
bound := path | lifetime
3432-
~~~~
3424+
The type of a closure mapping an input of type `A` to an output of type `B` is `|A| -> B`. A closure with no arguments or return values has type `||`.
34333425

3434-
The type of a closure mapping an input of type `A` to an output of type `B` is
3435-
`|A| -> B`. A closure with no arguments or return values has type `||`.
3436-
Similarly, a procedure mapping `A` to `B` is `proc(A) -> B` and a no-argument
3437-
and no-return value closure has type `proc()`.
34383426

34393427
An example of creating and calling a closure:
34403428

@@ -3457,30 +3445,6 @@ call_closure(closure_no_args, closure_args);
34573445

34583446
```
34593447

3460-
Unlike closures, procedures may only be invoked once, but own their
3461-
environment, and are allowed to move out of their environment. Procedures are
3462-
allocated on the heap (unlike closures). An example of creating and calling a
3463-
procedure:
3464-
3465-
```rust
3466-
let string = ~"Hello";
3467-
3468-
// Creates a new procedure, passing it to the `spawn` function.
3469-
spawn(proc() {
3470-
println!("{} world!", string);
3471-
});
3472-
3473-
// the variable `string` has been moved into the previous procedure, so it is
3474-
// no longer usable.
3475-
3476-
3477-
// Create an invoke a procedure. Note that the procedure is *moved* when
3478-
// invoked, so it cannot be invoked again.
3479-
let f = proc(n: int) { n + 22 };
3480-
println!("answer: {}", f(20));
3481-
3482-
```
3483-
34843448
### Object types
34853449

34863450
Every trait item (see [traits](#traits)) defines a type with the same name as the trait.

branches/snap-stage3/src/doc/rustdoc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ that one can still write things like `#[deriving(Eq)]`).
165165
# // what's actually being documented.
166166
# fn fib(n: int) { n + 2 }
167167

168-
spawn(proc() { fib(200); })
168+
do spawn { fib(200); }
169169
```
170170
*/
171171
# fn foo() {}
172172

173-
The documentation online would look like `spawn(proc() { fib(200); })`, but when
173+
The documentation online would look like `do spawn { fib(200); }`, but when
174174
testing this code, the `fib` function will be included (so it can compile).
175175

176176
## Running tests (advanced)

branches/snap-stage3/src/doc/tutorial.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ Rust uses the unary star operator (`*`) to access the contents of a
14921492
box or pointer, similarly to C.
14931493
14941494
~~~
1495-
let owned = ~10;
1496-
let borrowed = &20;
1495+
let owned = ~20;
1496+
let borrowed = &30;
14971497

14981498
let sum = *owned + *borrowed;
14991499
~~~
@@ -1520,7 +1520,7 @@ can sometimes make code awkward and parenthesis-filled.
15201520
# struct Point { x: f64, y: f64 }
15211521
# enum Shape { Rectangle(Point, Point) }
15221522
# impl Shape { fn area(&self) -> int { 0 } }
1523-
let start = ~Point { x: 10.0, y: 20.0 };
1523+
let start = @Point { x: 10.0, y: 20.0 };
15241524
let end = ~Point { x: (*start).x + 100.0, y: (*start).y + 100.0 };
15251525
let rect = &Rectangle(*start, *end);
15261526
let area = (*rect).area();
@@ -1534,7 +1534,7 @@ dot), so in most cases, explicitly dereferencing the receiver is not necessary.
15341534
# struct Point { x: f64, y: f64 }
15351535
# enum Shape { Rectangle(Point, Point) }
15361536
# impl Shape { fn area(&self) -> int { 0 } }
1537-
let start = ~Point { x: 10.0, y: 20.0 };
1537+
let start = @Point { x: 10.0, y: 20.0 };
15381538
let end = ~Point { x: start.x + 100.0, y: start.y + 100.0 };
15391539
let rect = &Rectangle(*start, *end);
15401540
let area = rect.area();
@@ -1546,7 +1546,7 @@ something silly like
15461546
15471547
~~~
15481548
# struct Point { x: f64, y: f64 }
1549-
let point = &~Point { x: 10.0, y: 20.0 };
1549+
let point = &@~Point { x: 10.0, y: 20.0 };
15501550
println!("{:f}", point.x);
15511551
~~~
15521552
@@ -1907,6 +1907,7 @@ to a reference.
19071907
// As with typical function arguments, owned pointers
19081908
// are automatically converted to references
19091909

1910+
(@s).draw_reference();
19101911
(~s).draw_reference();
19111912

19121913
// Unlike typical function arguments, the self value will
@@ -1917,7 +1918,7 @@ s.draw_reference();
19171918
(& &s).draw_reference();
19181919

19191920
// ... and dereferenced and borrowed
1920-
(&~s).draw_reference();
1921+
(&@~s).draw_reference();
19211922
~~~
19221923
19231924
Implementations may also define standalone (sometimes called "static")
@@ -2402,7 +2403,7 @@ that, like strings and vectors, objects have dynamic size and may
24022403
only be referred to via one of the pointer types.
24032404
Other pointer types work as well.
24042405
Casts to traits may only be done with compatible pointers so,
2405-
for example, an `&Circle` may not be cast to an `~Drawable`.
2406+
for example, an `@Circle` may not be cast to an `~Drawable`.
24062407
24072408
~~~
24082409
# type Circle = int; type Rectangle = int;
@@ -2505,8 +2506,8 @@ use std::f64::consts::PI;
25052506
# impl Circle for CircleStruct { fn radius(&self) -> f64 { (self.area() / PI).sqrt() } }
25062507
# impl Shape for CircleStruct { fn area(&self) -> f64 { PI * square(self.radius) } }
25072508
2508-
let concrete = ~CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2509-
let mycircle: ~Circle = concrete as ~Circle;
2509+
let concrete = @CircleStruct{center:Point{x:3.0,y:4.0},radius:5.0};
2510+
let mycircle: @Circle = concrete as @Circle;
25102511
let nonsense = mycircle.radius() * mycircle.area();
25112512
~~~
25122513

branches/snap-stage3/src/etc/combine-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def scrub(b):
5454
#[crate_id=\"run_pass_stage2#0.1\"];
5555
#[crate_id=\"run_pass_stage2#0.1\"];
5656
#[feature(globs, macro_rules, struct_variant, managed_boxes)];
57-
#![allow(warnings)]
57+
#[allow(warnings)];
5858
extern crate collections;
5959
"""
6060
)

branches/snap-stage3/src/libarena/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2424
html_root_url = "http://static.rust-lang.org/doc/master")]
2525
#![allow(missing_doc)]
26+
#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
2627

2728
extern crate collections;
2829

0 commit comments

Comments
 (0)