Skip to content

Commit 2514947

Browse files
committed
---
yaml --- r: 138331 b: refs/heads/auto c: d670919 h: refs/heads/master i: 138329: 191f611 138327: d57c8ec v: v3
1 parent 12219f4 commit 2514947

File tree

376 files changed

+3958
-4548
lines changed

Some content is hidden

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

376 files changed

+3958
-4548
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: 7876cf9ca915724d1888043a9cbfedd45009e5f2
16+
refs/heads/auto: d670919aa43d186317a89a375f4a5b7170fc08a8
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ documentation.
1010
3. Enjoy!
1111

1212
> ***Note:*** Windows users can read the detailed
13-
> [getting started][wiki-start] notes on the wiki.
13+
> [using Rust on Windows][win-wiki] notes on the wiki.
1414
1515
[installer]: http://www.rust-lang.org/install.html
1616
[guide]: http://doc.rust-lang.org/guide.html
17-
[wiki-start]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust
1817
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
1918

2019
## Building from Source
@@ -87,7 +86,7 @@ fetch snapshots, and an OS that can execute the available snapshot binaries.
8786

8887
Snapshot binaries are currently built and tested on several platforms:
8988

90-
* Windows (7, 8, Server 2008 R2), x86 only
89+
* Windows (7, 8, Server 2008 R2), x86 and x86-64 (64-bit support added in Rust 0.12.0)
9190
* Linux (2.6.18 or later, various distributions), x86 and x86-64
9291
* OSX 10.7 (Lion) or greater, x86 and x86-64
9392

branches/auto/mk/crates.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := libc std green native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rbml rlibc alloc debug rustrt \
54+
url log regex graphviz core rbml rlibc alloc rustrt \
5555
unicode
5656
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
5757
rustc_llvm rustc_back
@@ -63,20 +63,19 @@ DEPS_libc := core
6363
DEPS_rlibc := core
6464
DEPS_unicode := core
6565
DEPS_alloc := core libc native:jemalloc
66-
DEPS_debug := std
6766
DEPS_rustrt := alloc core libc collections native:rustrt_native
6867
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6968
native:rust_builtin native:backtrace
7069
DEPS_graphviz := std
7170
DEPS_green := std native:context_switch
7271
DEPS_native := std
73-
DEPS_syntax := std term serialize log fmt_macros debug arena libc
72+
DEPS_syntax := std term serialize log fmt_macros arena libc
7473
DEPS_rustc := syntax flate arena serialize getopts rbml \
75-
time log graphviz debug rustc_llvm rustc_back
74+
time log graphviz rustc_llvm rustc_back
7675
DEPS_rustc_llvm := native:rustllvm libc std
7776
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7877
DEPS_rustdoc := rustc native:hoedown serialize getopts \
79-
test time debug
78+
test time
8079
DEPS_flate := std native:miniz
8180
DEPS_arena := std
8281
DEPS_graphviz := std

branches/auto/mk/install.mk

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,34 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
17+
install:
18+
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
19+
# Build the dist as the original user
20+
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_install
21+
else
22+
$(Q)$(MAKE) prepare_install
23+
endif
1824
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
19-
# Remove tmp files while we can because they may have been created under sudo
25+
# Remove tmp files because it's a decent amount of disk space
2026
$(Q)rm -R tmp/dist
2127

22-
uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
28+
prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
29+
30+
uninstall:
31+
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
32+
# Build the dist as the original user
33+
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_uninstall
34+
else
35+
$(Q)$(MAKE) prepare_uninstall
36+
endif
2337
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
24-
# Remove tmp files while we can because they may have been created under sudo
38+
# Remove tmp files because it's a decent amount of disk space
2539
$(Q)rm -R tmp/dist
2640

41+
prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
42+
43+
.PHONY: install prepare_install uninstall prepare_uninstall
44+
2745
tmp/empty_dir:
2846
mkdir -p $@
2947

branches/auto/mk/tests.mk

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,29 @@ check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
199199

200200
# Some less critical tests that are not prone to breakage.
201201
# Not run as part of the normal test suite, but tested by bors on checkin.
202-
check-secondary: check-lexer check-pretty
202+
check-secondary: check-build-compiletest check-lexer check-pretty
203203

204204
# check + check-secondary.
205-
check-all: check check-secondary
205+
#
206+
# Issue #17883: build check-secondary first so hidden dependencies in
207+
# e.g. building compiletest are exercised (resolve those by adding
208+
# deps to rules that need them; not by putting `check` first here).
209+
check-all: check-secondary check
206210

207211
# Pretty-printing tests.
208212
check-pretty: check-stage2-T-$(CFG_BUILD)-H-$(CFG_BUILD)-pretty-exec
209213

214+
define DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE
215+
check-stage$(1)-build-compiletest: $$(HBIN$(1)_H_$(CFG_BUILD))/compiletest$$(X_$(CFG_BUILD))
216+
endef
217+
218+
$(foreach stage,$(STAGES), \
219+
$(eval $(call DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE,$(stage))))
220+
221+
check-build-compiletest: \
222+
check-stage1-build-compiletest \
223+
check-stage2-build-compiletest
224+
210225
.PHONY: cleantmptestlogs cleantestlibs
211226

212227
cleantmptestlogs:
@@ -284,7 +299,7 @@ tidy:
284299
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
285300
$(Q)echo $(ALL_HS) \
286301
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287-
$(Q)find $(S)src -type f -perm a+x \
302+
$(Q)find $(S)src -type f -perm +a+x \
288303
-not -name '*.rs' -and -not -name '*.py' \
289304
-and -not -name '*.sh' \
290305
| grep '^$(S)src/jemalloc' -v \
@@ -720,6 +735,13 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
720735
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
721736
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
722737
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
738+
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
739+
# external crates.
740+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
741+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
742+
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
743+
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
744+
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
723745
PRETTY_DIRNAME_pretty-rpass = run-pass
724746
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
725747
PRETTY_DIRNAME_pretty-rfail = run-fail
@@ -738,7 +760,8 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
738760

739761
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
740762
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
741-
$$(PRETTY_DEPS_$(4))
763+
$$(PRETTY_DEPS_$(4)) \
764+
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
742765
@$$(call E, run pretty-rpass [$(2)]: $$<)
743766
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
744767
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \

branches/auto/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lower().into_string();
34+
let kind = caps.name("kind").to_ascii().to_lowercase().into_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);

branches/auto/src/compiletest/runtest.rs

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,12 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
947947
String::from_chars(c.as_slice())
948948
}
949949

950-
#[cfg(target_os = "windows")]
950+
#[cfg(windows)]
951951
fn prefix_matches( line : &str, prefix : &str ) -> bool {
952952
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
953953
}
954954

955-
#[cfg(any(target_os = "linux",
956-
target_os = "macos",
957-
target_os = "freebsd",
958-
target_os = "dragonfly"))]
955+
#[cfg(unix)]
959956
fn prefix_matches( line : &str, prefix : &str ) -> bool {
960957
line.starts_with( prefix )
961958
}
@@ -1356,24 +1353,21 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
13561353
}
13571354

13581355
// Linux and mac don't require adjusting the library search path
1359-
#[cfg(any(target_os = "linux",
1360-
target_os = "macos",
1361-
target_os = "freebsd",
1362-
target_os = "dragonfly"))]
1356+
#[cfg(unix)]
13631357
fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
13641358
format!("{} {}", prog, args.connect(" "))
13651359
}
13661360

1367-
#[cfg(target_os = "windows")]
1361+
#[cfg(windows)]
13681362
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
1369-
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
1370-
}
13711363

1372-
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1373-
// for diagnostic purposes
1374-
#[cfg(target_os = "windows")]
1375-
fn lib_path_cmd_prefix(path: &str) -> String {
1376-
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1364+
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
1365+
// for diagnostic purposes
1366+
fn lib_path_cmd_prefix(path: &str) -> String {
1367+
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
1368+
}
1369+
1370+
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
13771371
}
13781372

13791373
fn dump_output(config: &Config, testfile: &Path, out: &str, err: &str) {

branches/auto/src/doc/README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Dependencies
1+
# Rust documentations
2+
3+
## Dependencies
24

35
[Pandoc](http://johnmacfarlane.net/pandoc/installing.html), a universal
46
document converter, is required to generate docs as HTML from Rust's
@@ -10,7 +12,7 @@ docs from the master (English) docs.
1012
[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
1113
the translation data.
1214

13-
# Building
15+
## Building
1416

1517
To generate all the docs, just run `make docs` from the root of the repository.
1618
This will convert the distributed Markdown docs to HTML and generate HTML doc
@@ -24,7 +26,7 @@ rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2426

2527
(This, of course, requires a working build of the `rustdoc` tool.)
2628

27-
# Additional notes
29+
## Additional notes
2830

2931
To generate an HTML version of a doc from Markdown manually, you can do
3032
something like:
@@ -33,37 +35,39 @@ something like:
3335
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
3436
~~~~
3537

36-
(reference.md being the Rust Reference Manual.)
38+
(`reference.md` being the Rust Reference Manual.)
3739

3840
The syntax for pandoc flavored markdown can be found at:
39-
http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
41+
42+
- http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
4043

4144
A nice quick reference (for non-pandoc markdown) is at:
42-
http://kramdown.rubyforge.org/quickref.html
4345

44-
# Notes for translators
46+
- http://kramdown.gettalong.org/quickref.html
47+
48+
## Notes for translators
4549

4650
Notice: The procedure described below is a work in progress. We are working on
4751
translation system but the procedure contains some manual operations for now.
4852

49-
To start the translation for a new language, see po4a.conf at first.
53+
To start the translation for a new language, see `po4a.conf` at first.
5054

51-
To generate .pot and .po files, do something like:
55+
To generate `.pot` and `.po` files, do something like:
5256

5357
~~~~
5458
po4a --copyright-holder="The Rust Project Developers" \
5559
--package-name="Rust" \
56-
--package-version="0.11.0" \
60+
--package-version="0.13.0" \
5761
-M UTF-8 -L UTF-8 \
5862
src/doc/po4a.conf
5963
~~~~
6064

61-
(the version number must be changed if it is not 0.11.0 now.)
65+
(the version number must be changed if it is not `0.13.0` now.)
6266

63-
Now you can translate documents with .po files, commonly used with gettext. If
67+
Now you can translate documents with `.po` files, commonly used with gettext. If
6468
you are not familiar with gettext-based translation, please read the online
6569
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
66-
file encoding of .po files.
70+
file encoding of `.po` files.
6771

6872
When you want to make a commit, do the command below before staging your
6973
change:
@@ -79,4 +83,4 @@ for f in src/doc/po/**/*.po; do
7983
done
8084
~~~~
8185

82-
This removes untranslated entries from .po files to save disk space.
86+
This removes untranslated entries from `.po` files to save disk space.

branches/auto/src/doc/guide-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ fn main() {
298298
C code:
299299

300300
~~~~c
301-
typedef void (*rust_callback)(int32_t);
301+
typedef void (*rust_callback)(void*, int32_t);
302302
void* cb_target;
303303
rust_callback cb;
304304

branches/auto/src/doc/guide-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,5 +206,5 @@ Many more bytes than graphemes!
206206

207207
# Other Documentation
208208

209-
* [the `&str` API documentation](/std/str/index.html)
209+
* [the `&str` API documentation](std/str/index.html)
210210
* [the `String` API documentation](std/string/index.html)

branches/auto/src/doc/guide-tasks.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ concurrency: particularly, ownership. The language leaves the implementation
4141
details to the standard library.
4242

4343
The `spawn` function has a very simple type signature: `fn spawn(f: proc():
44-
Send)`. Because it accepts only procs, and procs contain only owned data,
44+
Send)`. Because it accepts only procs, and procs contain only owned data,
4545
`spawn` can safely move the entire proc and all its associated state into an
4646
entirely different task for execution. Like any closure, the function passed to
4747
`spawn` may capture an environment that it carries across tasks.
@@ -213,7 +213,7 @@ println!("fib(50) = {}", delayed_fib.get())
213213
# }
214214
```
215215

216-
The call to `future::spawn` returns immediately a `future` object regardless of
216+
The call to `future::spawn` immediately returns a `future` object regardless of
217217
how long it takes to run `fib(50)`. You can then make yourself a sandwich while
218218
the computation of `fib` is running. The result of the execution of the method
219219
is obtained by calling `get` on the future. This call will block until the
@@ -297,7 +297,7 @@ let numbers_arc = Arc::new(numbers);
297297
```
298298

299299
and a clone is captured for each task via a procedure. This only copies
300-
the wrapper and not it's contents. Within the task's procedure, the captured
300+
the wrapper and not its contents. Within the task's procedure, the captured
301301
Arc reference can be used as a shared reference to the underlying vector as
302302
if it were local.
303303

@@ -323,20 +323,20 @@ Rust has a built-in mechanism for raising exceptions. The `fail!()` macro
323323
(which can also be written with an error string as an argument: `fail!(
324324
~reason)`) and the `assert!` construct (which effectively calls `fail!()` if a
325325
boolean expression is false) are both ways to raise exceptions. When a task
326-
raises an exception the task unwinds its stack---running destructors and
327-
freeing memory along the way---and then exits. Unlike exceptions in C++,
326+
raises an exception, the task unwinds its stackrunning destructors and
327+
freeing memory along the wayand then exits. Unlike exceptions in C++,
328328
exceptions in Rust are unrecoverable within a single task: once a task fails,
329329
there is no way to "catch" the exception.
330330

331331
While it isn't possible for a task to recover from failure, tasks may notify
332332
each other of failure. The simplest way of handling task failure is with the
333-
`try` function, which is similar to `spawn`, but immediately blocks waiting for
334-
the child task to finish. `try` returns a value of type `Result<T, Box<Any +
335-
Send>>`. `Result` is an `enum` type with two variants: `Ok` and `Err`. In this
336-
case, because the type arguments to `Result` are `int` and `()`, callers can
337-
pattern-match on a result to check whether it's an `Ok` result with an `int`
338-
field (representing a successful result) or an `Err` result (representing
339-
termination with an error).
333+
`try` function, which is similar to `spawn`, but immediately blocks and waits
334+
for the child task to finish. `try` returns a value of type
335+
`Result<T, Box<Any + Send>>`. `Result` is an `enum` type with two variants:
336+
`Ok` and `Err`. In this case, because the type arguments to `Result` are `int`
337+
and `()`, callers can pattern-match on a result to check whether it's an `Ok`
338+
result with an `int` field (representing a successful result) or an `Err` result
339+
(representing termination with an error).
340340

341341
```{rust}
342342
# use std::task;
@@ -369,4 +369,4 @@ the entire program (perhaps you're writing an assert which, if it trips,
369369
indicates an unrecoverable logic error); in other cases you might want to
370370
contain the failure at a certain boundary (perhaps a small piece of input from
371371
the outside world, which you happen to be processing in parallel, is malformed
372-
and its processing task can't proceed).
372+
such that the processing task cannot proceed).

0 commit comments

Comments
 (0)