Skip to content

Commit 062e8f7

Browse files
committed
---
yaml --- r: 165711 b: refs/heads/auto c: e473e70 h: refs/heads/master i: 165709: bb7c9ec 165707: 36fd8f3 165703: 6a6583b 165695: 93200a6 v: v3
1 parent 8ecf861 commit 062e8f7

File tree

311 files changed

+2433
-4450
lines changed

Some content is hidden

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

311 files changed

+2433
-4450
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: f6a7388210e40741e9e5d50ef376ceba3cb34e61
13+
refs/heads/auto: e473e700ccb94177cdc8e799b9f08bceb1c75601
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/crates.mk

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57-
rustc_trans rustc_back rustc_llvm
56+
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_driver rustc_trans rustc_back rustc_llvm
5857
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
5958
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6059
TOOLS := compiletest rustdoc rustc
@@ -68,12 +67,11 @@ DEPS_std := core libc rand alloc collections unicode \
6867
DEPS_graphviz := std
6968
DEPS_syntax := std term serialize log fmt_macros arena libc
7069
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
71-
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans
70+
rustc_typeck log syntax serialize rustc_llvm rustc_trans
7271
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7372
log syntax serialize rustc_llvm
7473
DEPS_rustc_typeck := rustc syntax
7574
DEPS_rustc_borrowck := rustc log graphviz syntax
76-
DEPS_rustc_resolve := rustc log syntax
7775
DEPS_rustc := syntax flate arena serialize getopts rbml \
7876
time log graphviz rustc_llvm rustc_back
7977
DEPS_rustc_llvm := native:rustllvm libc std
@@ -120,11 +118,9 @@ DOC_CRATES := $(filter-out rustc, \
120118
$(filter-out rustc_trans, \
121119
$(filter-out rustc_typeck, \
122120
$(filter-out rustc_borrowck, \
123-
$(filter-out rustc_resolve, \
124121
$(filter-out rustc_driver, \
125-
$(filter-out syntax, $(CRATES))))))))
126-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
127-
rustc_typeck rustc_driver syntax
122+
$(filter-out syntax, $(CRATES)))))))
123+
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_typeck rustc_driver syntax
128124

129125
# This macro creates some simple definitions for each crate being built, just
130126
# some munging of all of the parameters above.

branches/auto/mk/docs.mk

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,36 @@ endef
216216
$(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))
217217

218218

219+
# Localized documentation
220+
221+
# FIXME: I (huonw) haven't actually been able to test properly, since
222+
# e.g. (by default) I'm doing an out-of-tree build (#12763), but even
223+
# adjusting for that, the files are too old(?) and are rejected by
224+
# po4a.
225+
#
226+
# As such, I've attempted to get it working as much as possible (and
227+
# switching from pandoc to rustdoc), but preserving the old behaviour
228+
# (e.g. only running on the guide)
229+
.PHONY: l10n-mds
230+
l10n-mds: $(D)/po4a.conf \
231+
$(foreach lang,$(L10N_LANG),$(D)/po/$(lang)/*.md.po)
232+
$(warning WARNING: localized documentation is experimental)
233+
po4a --copyright-holder="The Rust Project Developers" \
234+
--package-name="Rust" \
235+
--package-version="$(CFG_RELEASE)" \
236+
-M UTF-8 -L UTF-8 \
237+
$(D)/po4a.conf
238+
239+
define DEF_L10N_DOC
240+
DOC_L10N_TARGETS += doc/l10n/$(1)/$(2).html
241+
doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
242+
@$$(call E, rustdoc: $$@)
243+
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
244+
endef
245+
246+
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
247+
248+
219249
######################################################################
220250
# Rustdoc (libstd/extra)
221251
######################################################################
@@ -264,3 +294,7 @@ endif
264294

265295
docs: $(DOC_TARGETS)
266296
compiler-docs: $(COMPILER_DOC_TARGETS)
297+
298+
docs-l10n: $(DOC_L10N_TARGETS)
299+
300+
.PHONY: docs-l10n

branches/auto/mk/tests.mk

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
25-
$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_trans,$(HOST_CRATES))
2625
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2726

2827
######################################################################
@@ -74,6 +73,21 @@ endif
7473
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
7574
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
7675

76+
TEST_RATCHET_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4)-metrics.json
77+
TEST_RATCHET_NOISE_PERCENT=10.0
78+
79+
# Whether to ratchet or merely save benchmarks
80+
ifdef CFG_RATCHET_BENCH
81+
CRATE_TEST_EXTRA_ARGS= \
82+
--test $(TEST_BENCH) \
83+
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
84+
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
85+
else
86+
CRATE_TEST_EXTRA_ARGS= \
87+
--test $(TEST_BENCH) \
88+
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
89+
endif
90+
7791
# If we're sharding the testsuite between parallel testers,
7892
# pass this argument along to the compiletest and crate test
7993
# invocations.
@@ -285,7 +299,7 @@ tidy:
285299
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
286300
$(Q)echo $(ALL_HS) \
287301
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
288-
$(Q)find $(S)src -type f -perm /a+x \
302+
$(Q)find $(S)src -type f -perm +a+x \
289303
-not -name '*.rs' -and -not -name '*.py' \
290304
-and -not -name '*.sh' \
291305
| grep '^$(S)src/jemalloc' -v \
@@ -440,6 +454,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
440454
$$(Q)touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
441455
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/
442456
$$(Q)$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
457+
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/$$(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) tmp/
443458
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
444459
then \
445460
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
@@ -681,6 +696,7 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
681696
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
682697
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
683698
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
699+
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
684700
--mode $$(CTEST_MODE_$(4)) \
685701
$$(CTEST_RUNTOOL_$(4))
686702

branches/auto/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
16091609
stderr_out.as_slice());
16101610

16111611
ProcRes {
1612-
status: process::ProcessExit::ExitStatus(exitcode),
1612+
status: process::ExitStatus(exitcode),
16131613
stdout: stdout_out,
16141614
stderr: stderr_out,
16151615
cmdline: cmdline
@@ -1666,7 +1666,7 @@ fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
16661666
// FIXME (#9639): This needs to handle non-utf8 paths
16671667
let mut link_args = vec!("-L".to_string(),
16681668
aux_dir.as_str().unwrap().to_string());
1669-
let llvm_args = vec!("--emit=llvm-bc,obj".to_string(),
1669+
let llvm_args = vec!("--emit=bc,obj".to_string(),
16701670
"--crate-type=lib".to_string());
16711671
link_args.extend(llvm_args.into_iter());
16721672
let args = make_compile_args(config,

branches/auto/src/doc/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
document converter, is required to generate docs as HTML from Rust's
77
source code.
88

9+
[po4a](http://po4a.alioth.debian.org/) is required for generating translated
10+
docs from the master (English) docs.
11+
12+
[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
13+
the translation data.
14+
915
## Building
1016

1117
To generate all the docs, just run `make docs` from the root of the repository.
@@ -38,3 +44,43 @@ The syntax for pandoc flavored markdown can be found at:
3844
A nice quick reference (for non-pandoc markdown) is at:
3945

4046
- http://kramdown.gettalong.org/quickref.html
47+
48+
## Notes for translators
49+
50+
Notice: The procedure described below is a work in progress. We are working on
51+
translation system but the procedure contains some manual operations for now.
52+
53+
To start the translation for a new language, see `po4a.conf` at first.
54+
55+
To generate `.pot` and `.po` files, do something like:
56+
57+
~~~~
58+
po4a --copyright-holder="The Rust Project Developers" \
59+
--package-name="Rust" \
60+
--package-version="0.13.0" \
61+
-M UTF-8 -L UTF-8 \
62+
src/doc/po4a.conf
63+
~~~~
64+
65+
(the version number must be changed if it is not `0.13.0` now.)
66+
67+
Now you can translate documents with `.po` files, commonly used with gettext. If
68+
you are not familiar with gettext-based translation, please read the online
69+
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
70+
file encoding of `.po` files.
71+
72+
When you want to make a commit, do the command below before staging your
73+
change:
74+
75+
~~~~
76+
for f in src/doc/po/**/*.po; do
77+
msgattrib --translated $f -o $f.strip
78+
if [ -e $f.strip ]; then
79+
mv $f.strip $f
80+
else
81+
rm $f
82+
fi
83+
done
84+
~~~~
85+
86+
This removes untranslated entries from `.po` files to save disk space.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ fn main() {
324324
let f = Foo { x: y }; // -+ f goes into scope
325325
// stuff // |
326326
// |
327-
} // -+ f and y go out of scope
327+
} // -+ f & y go out of scope
328328
```
329329

330330
Our `f` lives within the scope of `y`, so everything works. What if it didn't?
@@ -342,7 +342,7 @@ fn main() {
342342
let y = &5i; // ---+ y goes into scope
343343
let f = Foo { x: y }; // ---+ f goes into scope
344344
x = &f.x; // | | error here
345-
} // ---+ f and y go out of scope
345+
} // ---+ f & y go out of scope
346346
// |
347347
println!("{}", x); // |
348348
} // -+ x goes out of scope
@@ -395,7 +395,7 @@ struct Wheel {
395395
}
396396
397397
fn main() {
398-
let car = Car { name: "DeLorean".to_string() };
398+
let car = Car { name: "DeLorian".to_string() };
399399
400400
for _ in range(0u, 4) {
401401
Wheel { size: 360, owner: car };
@@ -431,7 +431,7 @@ struct Wheel {
431431
}
432432

433433
fn main() {
434-
let car = Car { name: "DeLorean".to_string() };
434+
let car = Car { name: "DeLorian".to_string() };
435435

436436
let car_owner = Rc::new(car);
437437

0 commit comments

Comments
 (0)