Skip to content

Commit 36c17c5

Browse files
committed
---
yaml --- r: 64760 b: refs/heads/snap-stage3 c: 7079ec6 h: refs/heads/master v: v3
1 parent 05aa6d2 commit 36c17c5

Some content is hidden

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

103 files changed

+1959
-2113
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 4989799799df1fb7c23fc0bf017be8faa356387f
4+
refs/heads/snap-stage3: 7079ec6e2ed0d9de58d5a87b8ac7f6c31a65a4cd
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rustpkg.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ A package ID can also specify a version, like:
7676
`github.com/mozilla/rust#0.3`.
7777
In this case, `rustpkg` will check that the repository `github.com/mozilla/rust` has a tag named `0.3`,
7878
and report an error otherwise.
79+
A package ID can also specify a particular revision of a repository, like:
80+
`github.com/mozilla/rust#release-0.7`.
81+
When the refspec (portion of the package ID after the `#`) can't be parsed as a decimal number,
82+
rustpkg passes the refspec along to the version control system without interpreting it.
83+
rustpkg also interprets any dependencies on such a package ID literally
84+
(as opposed to versions, where a newer version satisfies a dependency on an older version).
85+
Thus, `github.com/mozilla/rust#5c4cd30f80` is also a valid package ID,
86+
since git can deduce that 5c4cd30f80 refers to a revision of the desired repository.
7987

8088
## Source files
8189

branches/snap-stage3/doc/tutorial-container.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,12 @@ impl Iterator<int> for ZeroStream {
108108
## Container iterators
109109
110110
Containers implement iteration over the contained elements by returning an
111-
iterator object. For example, vector slices several iterators available:
111+
iterator object. For example, vector slices have four iterators available:
112112
113-
* `iter()` and `rev_iter()`, for immutable references to the elements
114-
* `mut_iter()` and `mut_rev_iter()`, for mutable references to the elements
115-
* `consume_iter()` and `consume_rev_iter`, to move the elements out by-value
116-
117-
A typical mutable container will implement at least `iter()`, `mut_iter()` and
118-
`consume_iter()` along with the reverse variants if it maintains an order.
113+
* `vector.iter()`, for immutable references to the elements
114+
* `vector.mut_iter()`, for mutable references to the elements
115+
* `vector.rev_iter()`, for immutable references to the elements in reverse order
116+
* `vector.mut_rev_iter()`, for mutable references to the elements in reverse order
119117
120118
### Freezing
121119

branches/snap-stage3/mk/target.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \
8484
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): CFG_COMPILER_TRIPLE = $(2)
8585
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
8686
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
87-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
8887
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
8988
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
9089
| $$(TLIB$(1)_T_$(2)_H_$(3))/
@@ -95,7 +94,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
9594

9695
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \
9796
$$(DRIVER_CRATE) \
98-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
9997
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
10098
| $$(TBIN$(1)_T_$(2)_H_$(3))/
10199
@$$(call E, compile_and_link: $$@)

branches/snap-stage3/mk/tests.mk

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -319,58 +319,50 @@ endif
319319

320320
$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \
321321
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
322-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
323322
$$(STDTESTDEP_$(1)_$(2)_$(3))
324323
@$$(call E, compile_and_link: $$@)
325324
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
326325

327326
$(3)/stage$(1)/test/extratest-$(2)$$(X_$(2)): \
328327
$$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \
329-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
330328
$$(STDTESTDEP_$(1)_$(2)_$(3))
331329
@$$(call E, compile_and_link: $$@)
332330
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
333331

334332
$(3)/stage$(1)/test/syntaxtest-$(2)$$(X_$(2)): \
335333
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
336-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
337334
$$(STDTESTDEP_$(1)_$(2)_$(3))
338335
@$$(call E, compile_and_link: $$@)
339336
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
340337

341338
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): CFG_COMPILER_TRIPLE = $(2)
342339
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
343340
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
344-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
345341
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM_$(2)) \
346342
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
347343
@$$(call E, compile_and_link: $$@)
348344
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
349345

350346
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
351347
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
352-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
353348
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
354349
@$$(call E, compile_and_link: $$@)
355350
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
356351

357352
$(3)/stage$(1)/test/rustitest-$(2)$$(X_$(2)): \
358353
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
359-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
360354
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
361355
@$$(call E, compile_and_link: $$@)
362356
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
363357

364358
$(3)/stage$(1)/test/rusttest-$(2)$$(X_$(2)): \
365359
$$(RUST_LIB) $$(RUST_INPUTS) \
366-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
367360
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
368361
@$$(call E, compile_and_link: $$@)
369362
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
370363

371364
$(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
372365
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
373-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
374366
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
375367
@$$(call E, compile_and_link: $$@)
376368
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
@@ -545,10 +537,6 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
545537

546538
# Rules for the cfail/rfail/rpass/bench/perf test runner
547539

548-
# The tests select when to use debug configuration on their own;
549-
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
550-
CTEST_RUSTC_FLAGS = $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
551-
552540
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
553541
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
554542
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
@@ -560,7 +548,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
560548
--target $(2) \
561549
--adb-path=$(CFG_ADB) \
562550
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
563-
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) --target=$(2)" \
551+
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
564552
$$(CTEST_TESTARGS)
565553

566554
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)

branches/snap-stage3/mk/tools.mk

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ define TOOLS_STAGE_N_TARGET
3737

3838
$$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X_$(4)): \
3939
$$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \
40-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
40+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
41+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
42+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
4143
| $$(TBIN$(1)_T_$(4)_H_$(3))/
4244
@$$(call E, compile_and_link: $$@)
4345
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
4446

4547
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
4648
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
47-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
49+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
50+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
51+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
4852
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
4953
| $$(TLIB$(1)_T_$(4)_H_$(3))/
5054
@$$(call E, compile_and_link: $$@)
@@ -54,15 +58,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
5458

5559
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X_$(4)): \
5660
$$(DRIVER_CRATE) \
57-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
58-
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
61+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
5962
| $$(TBIN$(1)_T_$(4)_H_$(3))/
6063
@$$(call E, compile_and_link: $$@)
6164
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustpkg -o $$@ $$<
6265

6366
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
6467
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
65-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
68+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
69+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
70+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
6671
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
6772
| $$(TLIB$(1)_T_$(4)_H_$(3))/
6873
@$$(call E, compile_and_link: $$@)
@@ -72,15 +77,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
7277

7378
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \
7479
$$(DRIVER_CRATE) \
75-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
7680
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
7781
| $$(TBIN$(1)_T_$(4)_H_$(3))/
7882
@$$(call E, compile_and_link: $$@)
7983
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$<
8084

8185
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
8286
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
83-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
87+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
88+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
89+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
8490
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
8591
| $$(TLIB$(1)_T_$(4)_H_$(3))/
8692
@$$(call E, compile_and_link: $$@)
@@ -90,15 +96,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
9096

9197
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \
9298
$$(DRIVER_CRATE) \
93-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
9499
$$(TLIB$(1)_T_$(4)_H_$(4))/$(CFG_LIBRUSTI_$(4)) \
95100
| $$(TBIN$(1)_T_$(4)_H_$(3))/
96101
@$$(call E, compile_and_link: $$@)
97102
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
98103

99104
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
100105
$$(RUST_LIB) $$(RUST_INPUTS) \
101-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
106+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
107+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
108+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
102109
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
103110
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \
104111
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
@@ -111,7 +118,6 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
111118

112119
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)): \
113120
$$(DRIVER_CRATE) \
114-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
115121
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)) \
116122
| $$(TBIN$(1)_T_$(4)_H_$(3))/
117123
@$$(call E, compile_and_link: $$@)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ fn make_out_name(config: &config, testfile: &Path, extension: &str) -> Path {
681681
}
682682

683683
fn aux_output_dir_name(config: &config, testfile: &Path) -> Path {
684-
Path(output_base_name(config, testfile).to_str() + ".libaux")
684+
output_base_name(config, testfile).with_filetype("libaux")
685685
}
686686

687687
fn output_testname(testfile: &Path) -> Path {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
E=@echo
2+
TEMP=temp.el
3+
4+
EMACS ?= emacs
5+
6+
all: $(TEMP)
7+
$(EMACS) -batch -q -no-site-file -l ./$(TEMP) -f rustmode-compile
8+
rm -f $(TEMP)
9+
$(TEMP):
10+
$(E) '(setq load-path (cons "." load-path))' >> $(TEMP)
11+
$(E) '(defun rustmode-compile () (mapcar (lambda (x) (byte-compile-file x))' >> $(TEMP)
12+
$(E) ' (list "cm-mode.el" "rust-mode.el")))' >> $(TEMP)
13+
clean:
14+
rm -f *.elc $(TEMP)

branches/snap-stage3/src/etc/emacs/README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,21 @@ file:
1313
(add-to-list 'load-path "/path/to/rust-mode/")
1414
(require 'rust-mode)
1515

16-
Rust mode will automatically be associated with .rs files. To enable it
17-
explicitly, do `M-x rust-mode`.
16+
Make sure you byte-compile the .el files first, or the mode will be
17+
painfully slow. There is an included `Makefile` which will do it for
18+
you, so in the simplest case you can just run `make` and everything
19+
should Just Work.
20+
21+
If for some reason that doesn't work, you can byte compile manually,
22+
by pasting this in your `*scratch*` buffer, moving the cursor below
23+
it, and pressing `C-j`:
24+
25+
(progn
26+
(byte-compile-file "/path/to/rust-mode/cm-mode.el" t)
27+
(byte-compile-file "/path/to/rust-mode/rust-mode.el" t))
28+
29+
Rust mode will automatically be associated with .rs and .rc files. To
30+
enable it explicitly, do `M-x rust-mode`.
1831

1932
### package.el installation via Marmalade or MELPA
2033

@@ -54,6 +67,24 @@ should upgrade in order to support installation from multiple sources.
5467
The ELPA archive is deprecated and no longer accepting new packages,
5568
so the version there (1.7.1) is very outdated.
5669

70+
#### Important
71+
72+
In order to have cm-mode properly initialized after compilation prior
73+
to rust-mode.el compilation you will need to add these `advices` to
74+
your init file or if you are a melpa user install the `melpa` package.
75+
76+
```lisp
77+
(defadvice package-download-tar
78+
(after package-download-tar-initialize activate compile)
79+
"initialize the package after compilation"
80+
(package-initialize))
81+
82+
(defadvice package-download-single
83+
(after package-download-single-initialize activate compile)
84+
"initialize the package after compilation"
85+
(package-initialize))
86+
```
87+
5788
#### Install rust-mode
5889

5990
From there you can install rust-mode or any other modes by choosing

0 commit comments

Comments
 (0)