Skip to content

Commit 0a9f6c3

Browse files
committed
---
yaml --- r: 105918 b: refs/heads/auto c: 12b2607 h: refs/heads/master v: v3
1 parent 64963e8 commit 0a9f6c3

File tree

112 files changed

+2794
-1300
lines changed

Some content is hidden

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

112 files changed

+2794
-1300
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: 829df69f9f7a0dd0adbf072a47fd7c7600e75211
16+
refs/heads/auto: 12b2607572d6233a1d4b4f7592573e49b505771e
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/docs.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ SHOULD_BUILD_PDF_DOC_$(1) = 1
147147
endef
148148
$(foreach docname,$(PDF_DOCS),$(eval $(call DEF_SHOULD_BUILD_PDF_DOC,$(docname))))
149149

150+
doc/footer.tex: $(D)/footer.inc | doc/
151+
@$(call E, pandoc: $@)
152+
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
153+
150154
define DEF_DOC
151155

152156
# HTML (rustdoc)
@@ -163,10 +167,6 @@ doc/$(1).epub: $$(D)/$(1).md | doc/
163167
@$$(call E, pandoc: $$@)
164168
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
165169

166-
doc/footer.tex: $(D)/footer.inc | doc/
167-
@$$(call E, pandoc: $$@)
168-
$$(CFG_PANDOC) --from=html --to=latex $$< --output=$$@
169-
170170
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
171171
DOC_TARGETS += doc/$(1).tex
172172
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/

branches/auto/src/compiletest/compiletest.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
191191
}
192192

193193
pub fn str_mode(s: ~str) -> mode {
194-
match s {
195-
~"compile-fail" => mode_compile_fail,
196-
~"run-fail" => mode_run_fail,
197-
~"run-pass" => mode_run_pass,
198-
~"pretty" => mode_pretty,
199-
~"debug-info" => mode_debug_info,
200-
~"codegen" => mode_codegen,
194+
match s.as_slice() {
195+
"compile-fail" => mode_compile_fail,
196+
"run-fail" => mode_run_fail,
197+
"run-pass" => mode_run_pass,
198+
"pretty" => mode_pretty,
199+
"debug-info" => mode_debug_info,
200+
"codegen" => mode_codegen,
201201
_ => fail!("invalid mode")
202202
}
203203
}

branches/auto/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
1919
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2020
let mut line_num = 1u;
2121
for ln in rdr.lines() {
22-
error_patterns.push_all_move(parse_expected(line_num, ln));
22+
error_patterns.push_all_move(parse_expected(line_num, ln.unwrap()));
2323
line_num += 1u;
2424
}
2525
return error_patterns;

branches/auto/src/compiletest/header.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
140140
// Assume that any directives will be found before the first
141141
// module or function. This doesn't seem to be an optimization
142142
// with a warm page cache. Maybe with a cold one.
143+
let ln = ln.unwrap();
143144
if ln.starts_with("fn") || ln.starts_with("mod") {
144145
return true;
145146
} else { if !(it(ln.trim())) { return false; } }

branches/auto/src/compiletest/runtest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ use test::MetricMap;
3838

3939
pub fn run(config: config, testfile: ~str) {
4040

41-
match config.target {
41+
match config.target.as_slice() {
4242

43-
~"arm-linux-androideabi" => {
43+
"arm-linux-androideabi" => {
4444
if !config.adb_device_status {
4545
fail!("android device not available");
4646
}
@@ -277,8 +277,8 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
277277
let exe_file = make_exe_name(config, testfile);
278278
279279
let mut proc_args;
280-
match config.target {
281-
~"arm-linux-androideabi" => {
280+
match config.target.as_slice() {
281+
"arm-linux-androideabi" => {
282282

283283
cmds = cmds.replace("run","continue");
284284

@@ -682,9 +682,9 @@ fn exec_compiled_test(config: &config, props: &TestProps,
682682

683683
let env = props.exec_env.clone();
684684

685-
match config.target {
685+
match config.target.as_slice() {
686686

687-
~"arm-linux-androideabi" => {
687+
"arm-linux-androideabi" => {
688688
_arm_exec_compiled_test(config, props, testfile, env)
689689
}
690690

@@ -735,9 +735,9 @@ fn compose_and_run_compiler(
735735
&auxres);
736736
}
737737

738-
match config.target {
738+
match config.target.as_slice() {
739739

740-
~"arm-linux-androideabi" => {
740+
"arm-linux-androideabi" => {
741741
_arm_push_aux_shared_library(config, testfile);
742742
}
743743

branches/auto/src/doc/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ li {list-style-type: none; }
3535
* [The `getopts` argument parsing library](getopts/index.html)
3636
* [The `glob` file path matching library](glob/index.html)
3737
* [The `green` M:N runtime library](green/index.html)
38+
* [The `hexfloat` library for hexadecimal floating-point literals](hexfloat/index.html)
3839
* [The `native` 1:1 threading runtime](native/index.html)
3940
* [The `num` arbitrary precision numerics library](num/index.html)
41+
* [The `rand` library for random numbers and distributions](rand/index.html)
4042
* [The `rustc` compiler](rustc/index.html)
4143
* [The `rustuv` M:N I/O library](rustuv/index.html)
4244
* [The `semver` version collation library](semver/index.html)

branches/auto/src/doc/rust.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,6 @@ and are instead terminated by a semicolon.
14721472

14731473
~~~~
14741474
# use std::libc::{c_char, FILE};
1475-
# #[nolink]
14761475
14771476
extern {
14781477
fn fopen(filename: *c_char, mode: *c_char) -> *FILE;

branches/auto/src/etc/emacs/rust-mode-tests.el

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ fn indenting_middle_of_line() {
570570
pull_me_back_in();
571571
}
572572
}
573+
574+
fn indented_already() {
575+
576+
// The previous line already has its spaces
577+
}
573578
"
574579

575580
;; Symbol -> (line column)
@@ -596,7 +601,15 @@ fn indenting_middle_of_line() {
596601
(after-whitespace-indent-start (13 1))
597602
(after-whitespace-indent-target (13 8))
598603
(middle-pull-indent-start (15 19))
599-
(middle-pull-indent-target (15 12))))
604+
(middle-pull-indent-target (15 12))
605+
(blank-line-indented-already-bol-start (20 0))
606+
(blank-line-indented-already-bol-target (20 4))
607+
(blank-line-indented-already-middle-start (20 2))
608+
(blank-line-indented-already-middle-target (20 4))
609+
(nonblank-line-indented-already-bol-start (21 0))
610+
(nonblank-line-indented-already-bol-target (21 4))
611+
(nonblank-line-indented-already-middle-start (21 2))
612+
(nonblank-line-indented-already-middle-target (21 4))))
600613

601614
(defun rust-get-buffer-pos (pos-symbol)
602615
"Get buffer position from POS-SYMBOL.
@@ -793,3 +806,31 @@ All positions are position symbols found in `rust-test-positions-alist'."
793806
'middle-pull-indent-start
794807
'middle-pull-indent-target
795808
#'indent-for-tab-command))
809+
810+
(ert-deftest indent-line-blank-line-indented-already-bol ()
811+
(rust-test-motion
812+
rust-test-indent-motion-string
813+
'blank-line-indented-already-bol-start
814+
'blank-line-indented-already-bol-target
815+
#'indent-for-tab-command))
816+
817+
(ert-deftest indent-line-blank-line-indented-already-middle ()
818+
(rust-test-motion
819+
rust-test-indent-motion-string
820+
'blank-line-indented-already-middle-start
821+
'blank-line-indented-already-middle-target
822+
#'indent-for-tab-command))
823+
824+
(ert-deftest indent-line-nonblank-line-indented-already-bol ()
825+
(rust-test-motion
826+
rust-test-indent-motion-string
827+
'nonblank-line-indented-already-bol-start
828+
'nonblank-line-indented-already-bol-target
829+
#'indent-for-tab-command))
830+
831+
(ert-deftest indent-line-nonblank-line-indented-already-middle ()
832+
(rust-test-motion
833+
rust-test-indent-motion-string
834+
'nonblank-line-indented-already-middle-start
835+
'nonblank-line-indented-already-middle-target
836+
#'indent-for-tab-command))

branches/auto/src/etc/emacs/rust-mode.el

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@
140140
;; Otherwise, we are continuing the same expression from the previous line,
141141
;; so add one additional indent level
142142
(+ baseline rust-indent-offset))))))))))
143-
(when (not (eq (current-indentation) indent))
144-
;; If we're at the beginning of the line (before or at the current
145-
;; indentation), jump with the indentation change. Otherwise, save the
146-
;; excursion so that adding the indentations will leave us at the
147-
;; equivalent position within the line to where we were before.
148-
(if (<= (current-column) (current-indentation))
149-
(indent-line-to indent)
150-
(save-excursion (indent-line-to indent))))))
143+
144+
;; If we're at the beginning of the line (before or at the current
145+
;; indentation), jump with the indentation change. Otherwise, save the
146+
;; excursion so that adding the indentations will leave us at the
147+
;; equivalent position within the line to where we were before.
148+
(if (<= (current-column) (current-indentation))
149+
(indent-line-to indent)
150+
(save-excursion (indent-line-to indent)))))
151151

152152

153153
;; Font-locking definitions and helpers

0 commit comments

Comments
 (0)