Skip to content

Commit cbcac0c

Browse files
committed
---
yaml --- r: 79214 b: refs/heads/auto c: b4c36c2 h: refs/heads/master v: v3
1 parent 3798898 commit cbcac0c

File tree

391 files changed

+11957
-7828
lines changed

Some content is hidden

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

391 files changed

+11957
-7828
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: caf5321eb45db8ba64d3f9f4b9e16febfeb46a4c
16+
refs/heads/auto: b4c36c2d1b8079cdb14bd3bf85c1ffc43f1f1d15
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
branch = master
55
[submodule "src/libuv"]
66
path = src/libuv
7-
url = https://github.com/brson/libuv.git
7+
url = https://github.com/alexcrichton/libuv.git
88
branch = master
9+
[submodule "src/gyp"]
10+
path = src/gyp
11+
url = https://git.chromium.org/external/gyp.git

branches/auto/Makefile.in

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -574,19 +574,10 @@ ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
574574
$(foreach host,$(CFG_HOST_TRIPLES), \
575575
all-target-$(target)-host-$(host)))
576576

577-
all: rustllvm/llvm-auto-clean-stamp \
578-
$(ALL_TARGET_RULES) $(GENERATED) docs
577+
all: $(ALL_TARGET_RULES) $(GENERATED) docs
579578

580579
endif
581580

582-
# This is used to independently force an LLVM clean rebuild
583-
# when we changed something not otherwise captured by builtin
584-
# dependencies. In these cases, commit a change that touches
585-
# the stamp in the source dir.
586-
rustllvm/llvm-auto-clean-stamp: $(S)src/rustllvm/llvm-auto-clean-trigger
587-
$(Q)$(MAKE) clean-llvm
588-
touch $@
589-
590581

591582
######################################################################
592583
# Re-configuration

branches/auto/configure

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -664,32 +664,29 @@ do
664664
make_dir $i
665665
done
666666

667-
make_dir llvm
668667
for t in $CFG_HOST_TRIPLES
669668
do
670-
make_dir llvm/$t
669+
make_dir $t/llvm
671670
done
672671

673-
make_dir rustllvm
674672
for t in $CFG_HOST_TRIPLES
675673
do
676-
make_dir rustllvm/$t
674+
make_dir $t/rustllvm
677675
done
678676

679-
make_dir rt
680677
for t in $CFG_TARGET_TRIPLES
681678
do
682-
make_dir rt/$t
679+
make_dir $t/rt
683680
for s in 0 1 2 3
684681
do
685-
make_dir rt/$t/stage$s
682+
make_dir $t/rt/stage$s
686683
for i in \
687684
isaac linenoise sync test \
688685
arch/i386 arch/x86_64 arch/arm arch/mips \
689686
libuv libuv/src/ares libuv/src/eio libuv/src/ev \
690687
jemalloc
691688
do
692-
make_dir rt/$t/stage$s/$i
689+
make_dir $t/rt/stage$s/$i
693690
done
694691
done
695692
done
@@ -791,7 +788,7 @@ do
791788

792789
if [ -z $CFG_LLVM_ROOT ]
793790
then
794-
LLVM_BUILD_DIR=${CFG_BUILD_DIR}llvm/$t
791+
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
795792
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
796793
then
797794
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"

branches/auto/doc/rust.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ code_. They are defined in the same way as any other Rust function,
10381038
except that they have the `extern` modifier.
10391039

10401040
~~~
1041-
// Declares an extern fn, the ABI defaults to "C"
1041+
// Declares an extern fn, the ABI defaults to "C"
10421042
extern fn new_vec() -> ~[int] { ~[] }
10431043
10441044
// Declares an extern fn with "stdcall" ABI
@@ -1723,6 +1723,62 @@ Supported traits for `deriving` are:
17231723
each constituent field of the type must also implement `ToStr` and will have
17241724
`field.to_str()` invoked to build up the result.
17251725

1726+
### Stability
1727+
One can indicate the stability of an API using the following attributes:
1728+
1729+
* `deprecated`: This item should no longer be used, e.g. it has been
1730+
replaced. No guarantee of backwards-compatibility.
1731+
* `experimental`: This item was only recently introduced or is
1732+
otherwise in a state of flux. It may change significantly, or even
1733+
be removed. No guarantee of backwards-compatibility.
1734+
* `unstable`: This item is still under development, but requires more
1735+
testing to be considered stable. No guarantee of backwards-compatibility.
1736+
* `stable`: This item is considered stable, and will not change
1737+
significantly. Guarantee of backwards-compatibility.
1738+
* `frozen`: This item is very stable, and is unlikely to
1739+
change. Guarantee of backwards-compatibility.
1740+
* `locked`: This item will never change unless a serious bug is
1741+
found. Guarantee of backwards-compatibility.
1742+
1743+
These levels are directly inspired by
1744+
[Node.js' "stability index"](http://nodejs.org/api/documentation.html).
1745+
1746+
There are lints for disallowing items marked with certain levels:
1747+
`deprecated`, `experimental` and `unstable`; the first two will warn
1748+
by default. Items with not marked with a stability are considered to
1749+
be unstable for the purposes of the lint. One can give an optional
1750+
string that will be displayed when the lint flags the use of an item.
1751+
1752+
~~~ {.xfail-test}
1753+
#[warn(unstable)];
1754+
1755+
#[deprecated="replaced by `best`"]
1756+
fn bad() {
1757+
// delete everything
1758+
}
1759+
1760+
fn better() {
1761+
// delete fewer things
1762+
}
1763+
1764+
#[stable]
1765+
fn best() {
1766+
// delete nothing
1767+
}
1768+
1769+
fn main() {
1770+
bad(); // "warning: use of deprecated item: replaced by `best`"
1771+
1772+
better(); // "warning: use of unmarked item"
1773+
1774+
best(); // no warning
1775+
}
1776+
~~~
1777+
1778+
> **Note:** Currently these are only checked when applied to
1779+
> individual functions, structs, methods and enum variants, *not* to
1780+
> entire modules, traits, impls or enums themselves.
1781+
17261782
# Statements and expressions
17271783

17281784
Rust is _primarily_ an expression language. This means that most forms of

branches/auto/doc/tutorial-container.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,18 @@ impl Iterator<int> for ZeroStream {
105105
}
106106
~~~
107107
108+
In general, you cannot rely on the behavior of the `next()` method after it has
109+
returned `None`. Some iterators may return `None` forever. Others may behave
110+
differently.
111+
108112
## Container iterators
109113
110114
Containers implement iteration over the contained elements by returning an
111115
iterator object. For example, vector slices several iterators available:
112116
113117
* `iter()` and `rev_iter()`, for immutable references to the elements
114118
* `mut_iter()` and `mut_rev_iter()`, for mutable references to the elements
115-
* `move_iter()` and `move_rev_iter`, to move the elements out by-value
119+
* `move_iter()` and `move_rev_iter()`, to move the elements out by-value
116120
117121
A typical mutable container will implement at least `iter()`, `mut_iter()` and
118122
`move_iter()` along with the reverse variants if it maintains an order.
@@ -149,7 +153,7 @@ let result = xs.iter().fold(0, |accumulator, item| accumulator - *item);
149153
assert_eq!(result, -41);
150154
~~~
151155
152-
Some adaptors return an adaptor object implementing the `Iterator` trait itself:
156+
Most adaptors return an adaptor object implementing the `Iterator` trait itself:
153157
154158
~~~
155159
let xs = [1, 9, 2, 3, 14, 12];
@@ -158,6 +162,35 @@ let sum = xs.iter().chain(ys.iter()).fold(0, |a, b| a + *b);
158162
assert_eq!(sum, 57);
159163
~~~
160164
165+
Some iterator adaptors may return `None` before exhausting the underlying
166+
iterator. Additionally, if these iterator adaptors are called again after
167+
returning `None`, they may call their underlying iterator again even if the
168+
adaptor will continue to return `None` forever. This may not be desired if the
169+
underlying iterator has side-effects.
170+
171+
In order to provide a guarantee about behavior once `None` has been returned, an
172+
iterator adaptor named `fuse()` is provided. This returns an iterator that will
173+
never call its underlying iterator again once `None` has been returned:
174+
175+
~~~
176+
let xs = [1,2,3,4,5];
177+
let mut calls = 0;
178+
let it = xs.iter().scan((), |_, x| {
179+
calls += 1;
180+
if *x < 3 { Some(x) } else { None }});
181+
// the iterator will only yield 1 and 2 before returning None
182+
// If we were to call it 5 times, calls would end up as 5, despite only 2 values
183+
// being yielded (and therefore 3 unique calls being made). The fuse() adaptor
184+
// can fix this.
185+
let mut it = it.fuse();
186+
it.next();
187+
it.next();
188+
it.next();
189+
it.next();
190+
it.next();
191+
assert_eq!(calls, 3);
192+
~~~
193+
161194
## For loops
162195
163196
The function `range` (or `range_inclusive`) allows to simply iterate through a given range:

branches/auto/mk/clean.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,24 @@ clean: clean-misc $(CLEAN_STAGE_RULES)
3333

3434
clean-misc:
3535
@$(call E, cleaning)
36-
$(Q)find rustllvm rt $(CFG_BUILD_TRIPLE)/test \
36+
$(Q)find $(CFG_BUILD_TRIPLE)/rustllvm \
37+
$(CFG_BUILD_TRIPLE)/rt \
38+
$(CFG_BUILD_TRIPLE)/test \
3739
-name '*.[odasS]' -o \
3840
-name '*.so' -o \
3941
-name '*.dylib' -o \
4042
-name '*.dll' -o \
4143
-name '*.def' -o \
4244
-name '*.bc' \
4345
| xargs rm -f
44-
$(Q)find rustllvm rt $(CFG_BUILD_TRIPLE)\
46+
$(Q)find $(CFG_BUILD_TRIPLE)\
4547
-name '*.dSYM' \
4648
| xargs rm -Rf
4749
$(Q)rm -f $(RUNTIME_OBJS) $(RUNTIME_DEF)
4850
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
4951
$(Q)rm -Rf $(DOCS)
5052
$(Q)rm -Rf $(GENERATED)
51-
$(Q)rm -f tmp/*
53+
$(Q)rm -Rf tmp/*
5254
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5355
$(Q)rm -Rf $(foreach ext, \
5456
html aux cp fn ky log pdf pg toc tp vr cps, \

branches/auto/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
1212
PKG_EXE = $(PKG_DIR)-install.exe
1313
endif
1414

15-
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm
15+
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp
1616

1717
PKG_FILES := \
1818
$(S)COPYRIGHT \

branches/auto/mk/llvm.mk

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,22 @@ define DEF_LLVM_RULES
2424
# If CFG_LLVM_ROOT is defined then we don't build LLVM ourselves
2525
ifeq ($(CFG_LLVM_ROOT),)
2626

27-
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
27+
LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
28+
29+
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
2830
@$$(call E, make: llvm)
2931
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
3032
$$(Q)touch $$(LLVM_CONFIG_$(1))
3133
endif
3234

35+
# This is used to independently force an LLVM clean rebuild
36+
# when we changed something not otherwise captured by builtin
37+
# dependencies. In these cases, commit a change that touches
38+
# the stamp in the source dir.
39+
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
40+
$(Q)$(MAKE) clean-llvm
41+
touch $$@
42+
3343
endef
3444

3545
$(foreach host,$(CFG_HOST_TRIPLES), \

0 commit comments

Comments
 (0)