Skip to content

Commit 4e873ea

Browse files
committed
---
yaml --- r: 40396 b: refs/heads/dist-snap c: 1a2eaed h: refs/heads/master v: v3
1 parent 54e55c1 commit 4e873ea

File tree

210 files changed

+3066
-1550
lines changed

Some content is hidden

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

210 files changed

+3066
-1550
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: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: bcccf333ab728539bf63ed773e6182f9da33683e
10+
refs/heads/dist-snap: 1a2eaed43d69f92b4e3de934bab83a1b622b31ad
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Brian J. Burg <[email protected]>
2626
Brian Leibig <[email protected]>
2727
Chris Double <[email protected]>
2828
Chris Peterson <[email protected]>
29+
Chris Pressey <[email protected]>
2930
Damian Gryski <[email protected]>
3031
Damien Grassart <[email protected]>
3132
Daniel Brooks <[email protected]>

branches/dist-snap/Makefile.in

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ HSREQ$(1)_H_$(3) = \
341341
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
342342
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
343343
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
344+
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
344345
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
345346
$$(MKFILE_DEPS)
346347

@@ -350,17 +351,31 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
350351
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
351352
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
352353

353-
# Prerequisites for complete stageN targets
354+
# Prerequisites for a working stageN compiler and libraries
354355
SREQ$(1)_T_$(2)_H_$(3) = \
355356
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
356357
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
358+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
359+
360+
# Prerequisites for a working stageN compiler and libraries
361+
CSREQ$(1)_T_$(2)_H_$(3) = \
362+
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
363+
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
364+
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
365+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
366+
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
367+
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
368+
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
369+
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
370+
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
371+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
357372
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
358373
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
359374
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
360375
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
361376
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
362377
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
363-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
378+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)
364379

365380
ifeq ($(1),0)
366381
# Don't run the the stage0 compiler under valgrind - that ship has sailed
@@ -461,15 +476,7 @@ all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
461476

462477
else
463478

464-
TSREQS := \
465-
$(foreach target,$(CFG_TARGET_TRIPLES), \
466-
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
467-
FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
468-
CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X)
469-
RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
470-
RUSTI := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rusti$(X)
471-
472-
all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC) $(RUSTI)
479+
all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs
473480

474481
endif
475482

branches/dist-snap/configure

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,15 @@ then
432432
fi
433433
fi
434434

435+
# Force freebsd to build with clang; gcc doesn't like us there
436+
if [ $CFG_OSTYPE = unknown-freebsd ]
437+
then
438+
step_msg "on FreeBSD, forcing use of clang"
439+
CFG_ENABLE_CLANG=1
440+
putvar CFG_ENABLE_CLANG
441+
fi
442+
443+
435444
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
436445
then
437446
err "either clang or gcc is required"

branches/dist-snap/doc/tutorial.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If you've fulfilled those prerequisites, something along these lines
100100
should work.
101101

102102
~~~~ {.notrust}
103-
$ wget http://dl.rust-lang.org/dist/rust-0.4.tar.gz
103+
$ curl -O http://dl.rust-lang.org/dist/rust-0.4.tar.gz
104104
$ tar -xzf rust-0.4.tar.gz
105105
$ cd rust-0.4
106106
$ ./configure
@@ -490,7 +490,7 @@ const MY_STRUCTY_PASSWORD: Password = Password { value: MY_PASSWORD };
490490
## Operators
491491

492492
Rust's set of operators contains very few surprises. Arithmetic is done with
493-
`*`, `/`, `%`, `+`, and `-` (multiply, divide, remainder, plus, minus). `-` is
493+
`*`, `/`, `%`, `+`, and `-` (multiply, divide, take remainder, add, subtract). `-` is
494494
also a unary prefix operator that negates numbers. As in C, the bit operators
495495
`>>`, `<<`, `&`, `|`, and `^` are also supported.
496496

@@ -608,7 +608,7 @@ a wildcard pattern that matches any single value. The asterisk (`*`)
608608
is a different wildcard that can match one or more fields in an `enum`
609609
variant.
610610

611-
The patterns in an match arm are followed by a fat arrow, `=>`, then an
611+
The patterns in a match arm are followed by a fat arrow, `=>`, then an
612612
expression to evaluate. Each case is separated by commas. It's often
613613
convenient to use a block expression for each case, in which case the
614614
commas are optional.
@@ -865,7 +865,7 @@ fn area(sh: Shape) -> float {
865865
}
866866
~~~~
867867

868-
You can write a lone `_` to ignore an individual fields, and can
868+
You can write a lone `_` to ignore an individual field, and can
869869
ignore all fields of a variant like: `Circle(*)`. As in their
870870
introduction form, nullary enum patterns are written without
871871
parentheses.
@@ -1096,7 +1096,7 @@ All pointer types can be dereferenced with the `*` unary operator.
10961096
Managed boxes are pointers to heap-allocated, garbage collected
10971097
memory. Applying the unary `@` operator to an expression creates a
10981098
managed box. The resulting box contains the result of the
1099-
expression. Copying a shared box, as happens during assignment, only
1099+
expression. Copying a managed box, as happens during assignment, only
11001100
copies a pointer, never the contents of the box.
11011101

11021102
~~~~
@@ -1145,7 +1145,7 @@ Managed boxes never cross task boundaries.
11451145
In contrast with managed boxes, owned boxes have a single owning
11461146
memory slot and thus two owned boxes may not refer to the same
11471147
memory. All owned boxes across all tasks are allocated on a single
1148-
_exchange heap_, where their uniquely owned nature allows tasks to
1148+
_exchange heap_, where their uniquely-owned nature allows tasks to
11491149
exchange them efficiently.
11501150

11511151
Because owned boxes are uniquely owned, copying them requires allocating
@@ -1158,7 +1158,7 @@ let x = ~10;
11581158
let y = x; // error: copying a non-implicitly copyable type
11591159
~~~~
11601160

1161-
If you really want to copy a unique box you must say so explicitly.
1161+
If you really want to copy an owned box you must say so explicitly.
11621162

11631163
~~~~
11641164
let x = ~10;
@@ -1190,7 +1190,7 @@ become the sole owner of the box.
11901190

11911191
Rust borrowed pointers are a general purpose reference/pointer type,
11921192
similar to the C++ reference type, but guaranteed to point to valid
1193-
memory. In contrast with owned pointers, where the holder of a unique
1193+
memory. In contrast with owned pointers, where the holder of an owned
11941194
pointer is the owner of the pointed-to memory, borrowed pointers never
11951195
imply ownership. Pointers may be borrowed from any type, in which case
11961196
the pointer is guaranteed not to outlive the value it points to.
@@ -1210,14 +1210,14 @@ contains a point, but allocated in a different location:
12101210
~~~
12111211
# struct Point { x: float, y: float }
12121212
let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1213-
let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1214-
let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
1213+
let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1214+
let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
12151215
~~~
12161216
12171217
Suppose we wanted to write a procedure that computed the distance
12181218
between any two points, no matter where they were stored. For example,
12191219
we might like to compute the distance between `on_the_stack` and
1220-
`shared_box`, or between `shared_box` and `unique_box`. One option is
1220+
`managed_box`, or between `managed_box` and `owned_box`. One option is
12211221
to define a function that takes two arguments of type point—that is,
12221222
it takes the points by value. But this will cause the points to be
12231223
copied when we call the function. For points, this is probably not so
@@ -1241,11 +1241,11 @@ Now we can call `compute_distance()` in various ways:
12411241
~~~
12421242
# struct Point{ x: float, y: float };
12431243
# let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1244-
# let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1245-
# let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
1244+
# let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1245+
# let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
12461246
# fn compute_distance(p1: &Point, p2: &Point) -> float { 0f }
1247-
compute_distance(&on_the_stack, shared_box);
1248-
compute_distance(shared_box, unique_box);
1247+
compute_distance(&on_the_stack, managed_box);
1248+
compute_distance(managed_box, owned_box);
12491249
~~~
12501250
12511251
Here the `&` operator is used to take the address of the variable
@@ -1255,11 +1255,11 @@ value. We also call this _borrowing_ the local variable
12551255
`on_the_stack`, because we are created an alias: that is, another
12561256
route to the same data.
12571257
1258-
In the case of the boxes `shared_box` and `unique_box`, however, no
1258+
In the case of the boxes `managed_box` and `owned_box`, however, no
12591259
explicit action is necessary. The compiler will automatically convert
12601260
a box like `@point` or `~point` to a borrowed pointer like
12611261
`&point`. This is another form of borrowing; in this case, the
1262-
contents of the shared/unique box is being lent out.
1262+
contents of the managed/owned box is being lent out.
12631263
12641264
Whenever a value is borrowed, there are some limitations on what you
12651265
can do with the original. For example, if the contents of a variable

branches/dist-snap/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
3333
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
3434
PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR)
3535

36-
install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
36+
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
3737
$$(Q)mkdir -p $$(PTL$(1)$(2))
3838
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME))
3939
$$(Q)$$(call INSTALL_LIB, \
@@ -74,7 +74,7 @@ PHB = $(PREFIX_BIN)
7474
# Shorthand for the prefix bin directory
7575
PHL = $(PREFIX_LIB)
7676

77-
install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
77+
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
7878
$(Q)mkdir -p $(PREFIX_BIN)
7979
$(Q)mkdir -p $(PREFIX_LIB)
8080
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1

branches/dist-snap/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
352352
$$(COMPILER_CRATE) \
353353
$$(COMPILER_INPUTS) \
354354
$$(SREQ$(1)_T_$(2)_H_$(3)) \
355-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
355+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
356+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
356357
@$$(call E, compile_and_link: $$@)
357358
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
358359

branches/dist-snap/src/libcore/core.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ pub use coreops::ops::{Shl, Shr, Index};
5454
// warn-and-below.
5555

5656
/// The error log level
57-
pub const error : u32 = 0_u32;
57+
pub const error : u32 = 1_u32;
5858
/// The warning log level
59-
pub const warn : u32 = 1_u32;
59+
pub const warn : u32 = 2_u32;
6060
/// The info log level
61-
pub const info : u32 = 2_u32;
61+
pub const info : u32 = 3_u32;
6262
/// The debug log level
63-
pub const debug : u32 = 3_u32;
63+
pub const debug : u32 = 4_u32;
6464

6565
// A curious inner-module that's not exported that contains the binding
6666
// 'core' so that macro-expanded references to core::error and such
6767
// can be resolved within libcore.
6868
#[doc(hidden)] // FIXME #3538
6969
mod core {
70-
pub const error : u32 = 0_u32;
71-
pub const warn : u32 = 1_u32;
72-
pub const info : u32 = 2_u32;
73-
pub const debug : u32 = 3_u32;
70+
pub const error : u32 = 1_u32;
71+
pub const warn : u32 = 2_u32;
72+
pub const info : u32 = 3_u32;
73+
pub const debug : u32 = 4_u32;
7474
}
7575

7676
// Similar to above. Some magic to make core testable.

branches/dist-snap/src/libcore/result.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ pub pure fn to_either<T: Copy, U: Copy>(res: &Result<U, T>)
103103
* ok(parse_bytes(buf))
104104
* }
105105
*/
106-
pub fn chain<T, U: Copy, V: Copy>(res: Result<T, V>, op: fn(t: T)
106+
pub fn chain<T, U, V>(res: Result<T, V>, op: fn(t: T)
107107
-> Result<U, V>) -> Result<U, V> {
108108
match move res {
109109
Ok(move t) => op(move t),
110-
Err(move e) => Err(e)
110+
Err(move e) => Err(move e)
111111
}
112112
}
113113

@@ -119,13 +119,13 @@ pub fn chain<T, U: Copy, V: Copy>(res: Result<T, V>, op: fn(t: T)
119119
* immediately returned. This function can be used to pass through a
120120
* successful result while handling an error.
121121
*/
122-
pub fn chain_err<T: Copy, U: Copy, V: Copy>(
122+
pub fn chain_err<T, U, V>(
123123
res: Result<T, V>,
124124
op: fn(t: V) -> Result<T, U>)
125125
-> Result<T, U> {
126126
match move res {
127-
Ok(move t) => Ok(t),
128-
Err(move v) => op(v)
127+
Ok(move t) => Ok(move t),
128+
Err(move v) => op(move v)
129129
}
130130
}
131131

branches/dist-snap/src/libfuzzer/fuzzer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn as_str(f: fn@(+x: io::Writer)) -> ~str {
225225
io::with_str_writer(f)
226226
}
227227

228-
fn check_variants_of_ast(crate: ast::crate, codemap: @codemap::CodeMap,
228+
fn check_variants_of_ast(crate: ast::crate, codemap: codemap::CodeMap,
229229
filename: &Path, cx: context) {
230230
let stolen = steal(crate, cx.mode);
231231
let extra_exprs = vec::filter(common_exprs(),
@@ -239,7 +239,7 @@ fn check_variants_of_ast(crate: ast::crate, codemap: @codemap::CodeMap,
239239

240240
fn check_variants_T<T: Copy>(
241241
crate: ast::crate,
242-
codemap: @codemap::CodeMap,
242+
codemap: codemap::CodeMap,
243243
filename: &Path,
244244
thing_label: ~str,
245245
things: ~[T],

0 commit comments

Comments
 (0)