Skip to content

Commit 9bfc849

Browse files
committed
---
yaml --- r: 110527 b: refs/heads/snap-stage3 c: e2c84a7 h: refs/heads/master i: 110525: df6aef2 110523: 57fcf45 110519: 3a833d8 110511: 1a6a028 110495: 74917ba 110463: ea3880f v: v3
1 parent d356804 commit 9bfc849

File tree

499 files changed

+1782
-1631
lines changed

Some content is hidden

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

499 files changed

+1782
-1631
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: e415c25bcd81dc1f9a5a3d25d9b48ed2d545336b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1700f359bc5d6b8086194e3cc0f3698666dd41a4
4+
refs/heads/snap-stage3: e2c84a78b4a3e95ea0def29172022ef4cf695958
55
refs/heads/try: 597a645456b55e1c886ce15d23a192abdf4d55cf
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
@@ -59,7 +59,7 @@ documentation.
5959

6060
[repo]: https://github.com/mozilla/rust
6161
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
62-
[tutorial]: http://static.rust-lang.org/doc/nightly/tutorial.html
62+
[tutorial]: http://static.rust-lang.org/doc/master/tutorial.html
6363

6464
## Notes
6565

branches/snap-stage3/mk/dist.mk

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,17 @@ distcheck-osx: dist-osx
203203
# Unix binary installer tarballs
204204
######################################################################
205205

206-
define DEF_INSTALLER
207-
208-
$$(eval $$(call DEF_PREPARE,dir-$(1)))
209-
210-
dist-install-dir-$(1): PREPARE_HOST=$(1)
211-
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
212-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
213-
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
214-
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215-
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216-
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217-
dist-install-dir-$(1): PREPARE_CLEAN=true
218-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
206+
define DEF_PREPARE_DIST_DIR
207+
208+
dist-install-dir-$(1)$(3): PREPARE_HOST=$(1)
209+
dist-install-dir-$(1)$(3): PREPARE_TARGETS=$(2)
210+
dist-install-dir-$(1)$(3): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
211+
dist-install-dir-$(1)$(3): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
212+
dist-install-dir-$(1)$(3): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
213+
dist-install-dir-$(1)$(3): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
214+
dist-install-dir-$(1)$(3): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
215+
dist-install-dir-$(1)$(3): PREPARE_CLEAN=true
216+
dist-install-dir-$(1)$(3): prepare-base-dir-$(1) docs compiler-docs
219217
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
220218
> tmp/dist/manifest-$(1).in
221219
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -227,6 +225,16 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
227225
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
228226
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
229227

228+
endef
229+
230+
define DEF_INSTALLER
231+
232+
$$(eval $$(call DEF_PREPARE,dir-$(1)))
233+
234+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(1),))
235+
236+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(CFG_TARGET),-with-target-libs))
237+
230238
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
231239
@$(call E, build: $$@)
232240
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)

branches/snap-stage3/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD)
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs
1818
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD)
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs
2323
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
2525
$(Q)rm -R tmp/dist

branches/snap-stage3/mk/tests.mk

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
183183
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
184184
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
185185

186+
# NOTE: Remove after reprogramming windows bots
187+
check-fast: check-lite
188+
186189
.PHONY: cleantmptestlogs cleantestlibs
187190

188191
cleantmptestlogs:
@@ -875,69 +878,9 @@ $(foreach crate,$(TEST_CRATES), \
875878
$(eval $(call DEF_CHECK_CRATE,$(crate))))
876879

877880
######################################################################
878-
# check-fast rules
881+
# RMAKE rules
879882
######################################################################
880883

881-
FT := run_pass_stage2
882-
FT_LIB := $(call CFG_LIB_NAME_$(CFG_BUILD),$(FT))
883-
FT_DRIVER := $(FT)_driver
884-
885-
GENERATED += tmp/$(FT).rc tmp/$(FT_DRIVER).rs
886-
887-
tmp/$(FT).rc tmp/$(FT_DRIVER).rs: \
888-
$(RPASS_TESTS) \
889-
$(S)src/etc/combine-tests.py
890-
@$(call E, check: building combined stage2 test runner)
891-
$(Q)$(CFG_PYTHON) $(S)src/etc/combine-tests.py
892-
893-
define DEF_CHECK_FAST_FOR_T_H
894-
# $(1) unused
895-
# $(2) target triple
896-
# $(3) host triple
897-
898-
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
899-
tmp/$$(FT).rc \
900-
$$(SREQ2_T_$(2)_H_$(3))
901-
@$$(call E, oxidize: $$@)
902-
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
903-
-L "$$(RT_OUTPUT_DIR_$(2))"
904-
905-
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
906-
tmp/$$(FT_DRIVER).rs \
907-
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
908-
$$(SREQ2_T_$(2)_H_$(3))
909-
@$$(call E, oxidize: $$@ $$<)
910-
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
911-
-L "$$(RT_OUTPUT_DIR_$(2))"
912-
913-
$(3)/test/$$(FT_DRIVER)-$(2).out: \
914-
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)) \
915-
$$(SREQ2_T_$(2)_H_$(3))
916-
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) \
917-
--logfile tmp/$$(FT_DRIVER)-$(2).log
918-
919-
check-fast-T-$(2)-H-$(3): \
920-
$(3)/test/$$(FT_DRIVER)-$(2).out
921-
922-
endef
923-
924-
$(foreach host,$(CFG_HOST), \
925-
$(eval $(foreach target,$(CFG_TARGET), \
926-
$(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
927-
928-
check-fast: tidy check-fast-H-$(CFG_BUILD) \
929-
$(foreach crate,$(TARGET_CRATES),check-stage2-$(crate))
930-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
931-
932-
define DEF_CHECK_FAST_FOR_H
933-
934-
check-fast-H-$(1): check-fast-T-$(1)-H-$(1)
935-
936-
endef
937-
938-
$(foreach host,$(CFG_HOST), \
939-
$(eval $(call DEF_CHECK_FAST_FOR_H,$(host))))
940-
941884
RMAKE_TESTS := $(shell ls -d $(S)src/test/run-make/*/)
942885
RMAKE_TESTS := $(RMAKE_TESTS:$(S)src/test/run-make/%/=%)
943886

@@ -961,6 +904,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
961904
@rm -rf $(3)/test/run-make/$$*
962905
@mkdir -p $(3)/test/run-make/$$*
963906
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
907+
$$(MAKE) \
964908
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
965909
$(3)/test/run-make/$$* \
966910
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ pub fn run(lib_path: &str,
8484

8585
Some(Result {
8686
status: status,
87-
out: str::from_utf8_owned(output).unwrap(),
88-
err: str::from_utf8_owned(error).unwrap()
87+
out: str::from_utf8(output.as_slice()).unwrap().to_owned(),
88+
err: str::from_utf8(error.as_slice()).unwrap().to_owned()
8989
})
9090
},
9191
Err(..) => None

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
153153
match props.pp_exact { Some(_) => 1, None => 2 };
154154

155155
let src = File::open(testfile).read_to_end().unwrap();
156-
let src = str::from_utf8_owned(src).unwrap();
156+
let src = str::from_utf8(src.as_slice()).unwrap().to_owned();
157157
let mut srcs = vec!(src);
158158

159159
let mut round = 0;
@@ -177,7 +177,7 @@ fn run_pretty_test(config: &config, props: &TestProps, testfile: &Path) {
177177
Some(ref file) => {
178178
let filepath = testfile.dir_path().join(file);
179179
let s = File::open(&filepath).read_to_end().unwrap();
180-
str::from_utf8_owned(s).unwrap()
180+
str::from_utf8(s.as_slice()).unwrap().to_owned()
181181
}
182182
None => { (*srcs.get(srcs.len() - 2u)).clone() }
183183
};
@@ -1163,7 +1163,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
11631163
11641164
fn count_extracted_lines(p: &Path) -> uint {
11651165
let x = File::open(&p.with_extension("ll")).read_to_end().unwrap();
1166-
let x = str::from_utf8_owned(x).unwrap();
1166+
let x = str::from_utf8(x.as_slice()).unwrap();
11671167
x.lines().len()
11681168
}
11691169

branches/snap-stage3/src/doc/complement-cheatsheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Use the [`lines`](http://static.rust-lang.org/doc/master/std/io/trait.Buffer.htm
9696
use std::io::BufferedReader;
9797
# use std::io::MemReader;
9898
99-
# let reader = MemReader::new(~[]);
99+
# let reader = MemReader::new(vec!());
100100
101101
let mut reader = BufferedReader::new(reader);
102102
for line in reader.lines() {
@@ -152,7 +152,7 @@ struct Foo {
152152
}
153153
154154
struct FooClosure<'a> {
155-
myfunc: 'a |int, uint| -> i32
155+
myfunc: |int, uint|: 'a -> i32
156156
}
157157
158158
fn a(a: int, b: uint) -> i32 {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ li {list-style-type: none; }
6767

6868
# External resources
6969

70-
* The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
70+
* The Rust IRC channels on [irc.mozilla.org](http://irc.mozilla.org/)
71+
* [`#rust`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - general discussion
72+
* [`#rust-gamedev`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-gamedev) - game development
73+
* [`#rust-internals`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals) - compiler and libraries
74+
* [`#rust-osdev`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-osdev) - operating system development
7175
* The Rust community on [Reddit](http://reddit.com/r/rust)
7276
* The Rust [wiki](http://github.com/mozilla/rust/wiki)

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

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ operators](#binary-operator-expressions), or [keywords](#keywords).
432432
## Paths
433433

434434
~~~~ {.notrust .ebnf .gram}
435-
expr_path : ident [ "::" expr_path_tail ] + ;
435+
expr_path : [ "::" ] ident [ "::" expr_path_tail ] + ;
436436
expr_path_tail : '<' type_expr [ ',' type_expr ] + '>'
437437
| expr_path ;
438438
@@ -475,6 +475,51 @@ let x = id::<int>(10); // Type arguments used in a call expression
475475
# }
476476
~~~~
477477

478+
Paths can be denoted with various leading qualifiers to change the meaning of
479+
how it is resolved:
480+
481+
* Paths starting with `::` are considered to be global paths where the
482+
components of the path start being resolved from the crate root. Each
483+
identifier in the path must resolve to an item.
484+
485+
```rust
486+
mod a {
487+
pub fn foo() {}
488+
}
489+
mod b {
490+
pub fn foo() {
491+
::a::foo(); // call a's foo function
492+
}
493+
}
494+
# fn main() {}
495+
```
496+
497+
* Paths starting with the keyword `super` begin resolution relative to the
498+
parent module. Each further identifier must resolve to an item
499+
500+
```rust
501+
mod a {
502+
pub fn foo() {}
503+
}
504+
mod b {
505+
pub fn foo() {
506+
super::a::foo(); // call a's foo function
507+
}
508+
}
509+
# fn main() {}
510+
```
511+
512+
* Paths starting with the keyword `self` begin resolution relative to the
513+
current module. Each further identifier must resolve to an item.
514+
515+
```rust
516+
fn foo() {}
517+
fn bar() {
518+
self::foo();
519+
}
520+
# fn main() {}
521+
```
522+
478523
# Syntax extensions
479524

480525
A number of minor features of Rust are not central enough to have their own
@@ -3415,7 +3460,7 @@ fn add(x: int, y: int) -> int {
34153460
34163461
let mut x = add(5,7);
34173462
3418-
type Binop<'a> = 'a |int,int| -> int;
3463+
type Binop<'a> = |int,int|: 'a -> int;
34193464
let bo: Binop = add;
34203465
x = bo(5,7);
34213466
~~~~

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

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)