Skip to content

Commit de9b610

Browse files
committed
---
yaml --- r: 92158 b: refs/heads/auto c: e5f2021 h: refs/heads/master v: v3
1 parent 1bb271e commit de9b610

File tree

136 files changed

+1570
-1688
lines changed

Some content is hidden

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

136 files changed

+1570
-1688
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: c8498c19337f63b891f7f830a45636942badc56e
16+
refs/heads/auto: e5f20212028fd6cb5161dbb2c0f14c9d94f1caea
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/Makefile.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ TLIBRUSTUV_DEFAULT$(1)_T_$(2)_H_$(3) = \
431431
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTUV_$(2))
432432

433433
# Preqrequisites for using the stageN compiler
434+
ifeq ($(1),0)
435+
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
436+
else
434437
HSREQ$(1)_H_$(3) = \
435438
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
436439
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
@@ -439,6 +442,7 @@ HSREQ$(1)_H_$(3) = \
439442
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
440443
$$(HLIBRUSTUV_DEFAULT$(1)_H_$(3)) \
441444
$$(MKFILE_DEPS)
445+
endif
442446

443447
# Prerequisites for using the stageN compiler to build target artifacts
444448
TSREQ$(1)_T_$(2)_H_$(3) = \

branches/auto/mk/stage0.mk

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,6 @@ endif
2525
endif
2626
$(Q)touch $@
2727

28-
# Host libs will be extracted by the above rule
29-
30-
# NOTE: remove all these after the next snapshot
31-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_STDLIB_$(CFG_BUILD)): \
32-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
33-
| $(HLIB0_H_$(CFG_BUILD))/
34-
$(Q)touch $@
35-
36-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_EXTRALIB_$(CFG_BUILD)): \
37-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
38-
| $(HLIB0_H_$(CFG_BUILD))/
39-
$(Q)touch $@
40-
41-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
42-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
43-
| $(HLIB0_H_$(CFG_BUILD))/
44-
$(Q)touch $@
45-
46-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
47-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
48-
| $(HLIB0_H_$(CFG_BUILD))/
49-
$(Q)touch $@
50-
51-
$(HLIB0_H_$(CFG_BUILD))/$(CFG_RUSTLLVM_$(CFG_BUILD)): \
52-
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
53-
| $(HLIB0_H_$(CFG_BUILD))/
54-
$(Q)touch $@
55-
5628
# For other targets, let the host build the target:
5729

5830
define BOOTSTRAP_STAGE0
@@ -72,45 +44,6 @@ $$(HBIN0_H_$(1))/rustc$$(X_$(1)): \
7244
@$$(call E, cp: $$@)
7345
$$(Q)cp $$< $$@
7446

75-
# NOTE: removing everything below after the next snapshot
76-
$$(HLIB0_H_$(1))/$(CFG_STDLIB_$(1)): \
77-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_STDLIB_$(1)) \
78-
| $(HLIB0_H_$(1))/
79-
@$$(call E, cp: $$@)
80-
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
81-
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(STDLIB_GLOB_$(1)) $$@
82-
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
83-
84-
$$(HLIB0_H_$(1))/$(CFG_EXTRALIB_$(1)): \
85-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_EXTRALIB_$(1)) \
86-
| $(HLIB0_H_$(1))/
87-
@$$(call E, cp: $$@)
88-
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
89-
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(EXTRALIB_GLOB_$(1)) $$@
90-
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
91-
92-
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
93-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
94-
| $(HLIB0_H_$(1))/
95-
@$$(call E, cp: $$@)
96-
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
97-
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
98-
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
99-
100-
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(1)): \
101-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(1)) \
102-
| $(HLIB0_H_$(1))/
103-
@$$(call E, cp: $$@)
104-
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(4)),$$(notdir $$@))
105-
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTC_GLOB_$(1)) $$@
106-
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(4)),$$(notdir $$@))
107-
108-
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM_$(1)): \
109-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_RUSTLLVM_$(1)) \
110-
| $(HLIB0_H_$(1))/
111-
@$$(call E, cp: $$@)
112-
$$(Q)cp $$< $$@
113-
11447
endef
11548

11649
# Use stage1 to build other architectures: then you don't have to wait

branches/auto/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
130130
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
131131
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_RGLOB_$(2)),$$(notdir $$@))
132132
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) \
133-
-L "$$(LLVM_LIBDIR_$(3))" \
133+
-L "$$(LLVM_LIBDIR_$(2))" \
134134
--out-dir $$(@D) $$< && touch $$@
135135
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
136136
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_RGLOB_$(2)),$$(notdir $$@))

branches/auto/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ $(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
377377
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
378378
@$$(call E, compile_and_link: $$@)
379379
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
380-
-L "$$(LLVM_LIBDIR_$(3))"
380+
-L "$$(LLVM_LIBDIR_$(2))"
381381

382382
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
383383
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \

branches/auto/src/compiletest/compiletest.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,6 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
192192
match maybestr { None => ~"(none)", Some(s) => { s } }
193193
}
194194

195-
pub fn str_opt(maybestr: ~str) -> Option<~str> {
196-
if maybestr != ~"(none)" { Some(maybestr) } else { None }
197-
}
198-
199195
pub fn str_mode(s: ~str) -> mode {
200196
match s {
201197
~"compile-fail" => mode_compile_fail,

branches/auto/src/compiletest/runtest.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use header::TestProps;
1818
use header::load_props;
1919
use procsrv;
2020
use util::logv;
21+
#[cfg(target_os = "win32")]
2122
use util;
2223

2324
use std::io::File;
@@ -482,6 +483,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
482483
format!("{}:{}:", testfile.display(), ee.line)
483484
}).collect::<~[~str]>();
484485

486+
#[cfg(target_os = "win32")]
485487
fn to_lower( s : &str ) -> ~str {
486488
let i = s.chars();
487489
let c : ~[char] = i.map( |c| {
@@ -822,6 +824,7 @@ fn make_cmdline(libpath: &str, prog: &str, args: &[~str]) -> ~str {
822824

823825
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
824826
// for diagnostic purposes
827+
#[cfg(target_os = "win32")]
825828
fn lib_path_cmd_prefix(path: &str) -> ~str {
826829
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
827830
}

branches/auto/src/compiletest/util.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use common::config;
1212

13+
#[cfg(target_os = "win32")]
1314
use std::os::getenv;
1415

1516
/// Conversion table from triple OS name to Rust SYSNAME
@@ -31,6 +32,7 @@ pub fn get_os(triple: &str) -> &'static str {
3132
fail!("Cannot determine OS from triple");
3233
}
3334

35+
#[cfg(target_os = "win32")]
3436
pub fn make_new_path(path: &str) -> ~str {
3537

3638
// Windows just uses PATH as the library search path, so we have to
@@ -43,21 +45,9 @@ pub fn make_new_path(path: &str) -> ~str {
4345
}
4446
}
4547

46-
#[cfg(target_os = "linux")]
47-
#[cfg(target_os = "freebsd")]
48-
pub fn lib_path_env_var() -> ~str { ~"LD_LIBRARY_PATH" }
49-
50-
#[cfg(target_os = "macos")]
51-
pub fn lib_path_env_var() -> ~str { ~"DYLD_LIBRARY_PATH" }
52-
5348
#[cfg(target_os = "win32")]
5449
pub fn lib_path_env_var() -> ~str { ~"PATH" }
5550

56-
#[cfg(target_os = "linux")]
57-
#[cfg(target_os = "macos")]
58-
#[cfg(target_os = "freebsd")]
59-
pub fn path_div() -> ~str { ~":" }
60-
6151
#[cfg(target_os = "win32")]
6252
pub fn path_div() -> ~str { ~";" }
6353

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

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
;; or one further indent from that if either current line
8585
;; begins with 'else', or previous line didn't end in
8686
;; semi, comma or brace (other than whitespace and line
87-
;; comments) , and wasn't an attribute. But if we have
87+
;; comments) , and wasn't an attribute. But if we have
8888
;; something after the open brace and ending with a comma,
8989
;; treat it as fields and align them. PHEW.
9090
((> level 0)
@@ -213,15 +213,15 @@
213213

214214
(defun rust-fill-prefix-for-comment-start (line-start)
215215
"Determine what to use for `fill-prefix' based on what is at the beginning of a line."
216-
(let ((result
216+
(let ((result
217217
;; Replace /* with same number of spaces
218218
(replace-regexp-in-string
219-
"\\(?:/\\*+\\)[!*]"
219+
"\\(?:/\\*+\\)[!*]"
220220
(lambda (s)
221221
;; We want the * to line up with the first * of the comment start
222222
(concat (make-string (- (length s) 2) ?\x20) "*"))
223223
line-start)))
224-
;; Make sure we've got at least one space at the end
224+
;; Make sure we've got at least one space at the end
225225
(if (not (= (aref result (- (length result) 1)) ?\x20))
226226
(setq result (concat result " ")))
227227
result))
@@ -247,14 +247,14 @@
247247
;; inferring it from the comment start.
248248
(let ((next-bol (line-beginning-position 2)))
249249
(while (save-excursion
250-
(end-of-line)
251-
(syntax-ppss-flush-cache 1)
252-
(and (nth 4 (syntax-ppss))
253-
(save-excursion
254-
(beginning-of-line)
255-
(looking-at paragraph-start))
256-
(looking-at "[[:space:]]*$")
257-
(nth 4 (syntax-ppss next-bol))))
250+
(end-of-line)
251+
(syntax-ppss-flush-cache 1)
252+
(and (nth 4 (syntax-ppss))
253+
(save-excursion
254+
(beginning-of-line)
255+
(looking-at paragraph-start))
256+
(looking-at "[[:space:]]*$")
257+
(nth 4 (syntax-ppss next-bol))))
258258
(goto-char next-bol)))
259259

260260
(syntax-ppss-flush-cache 1)
@@ -269,10 +269,10 @@
269269

270270
(defun rust-with-comment-fill-prefix (body)
271271
(let*
272-
((line-string (buffer-substring-no-properties
272+
((line-string (buffer-substring-no-properties
273273
(line-beginning-position) (line-end-position)))
274274
(line-comment-start
275-
(when (nth 4 (syntax-ppss))
275+
(when (nth 4 (syntax-ppss))
276276
(cond
277277
;; If we're inside the comment and see a * prefix, use it
278278
((string-match "^\\([[:space:]]*\\*+[[:space:]]*\\)"
@@ -281,9 +281,9 @@
281281
;; If we're at the start of a comment, figure out what prefix
282282
;; to use for the subsequent lines after it
283283
((string-match (concat "[[:space:]]*" comment-start-skip) line-string)
284-
(rust-fill-prefix-for-comment-start
284+
(rust-fill-prefix-for-comment-start
285285
(match-string 0 line-string))))))
286-
(fill-prefix
286+
(fill-prefix
287287
(or line-comment-start
288288
fill-prefix)))
289289
(funcall body)))
@@ -294,7 +294,7 @@
294294
(defun rust-fill-paragraph (&rest args)
295295
"Special wrapping for `fill-paragraph' to handle multi-line comments with a * prefix on each line."
296296
(rust-in-comment-paragraph
297-
(lambda ()
297+
(lambda ()
298298
(rust-with-comment-fill-prefix
299299
(lambda ()
300300
(let
@@ -321,6 +321,20 @@
321321
(rust-with-comment-fill-prefix
322322
(lambda () (comment-indent-new-line arg))))
323323

324+
;;; Imenu support
325+
(defvar rust-imenu-generic-expression
326+
(append (loop for item in
327+
'("enum" "struct" "type" "mod" "fn")
328+
collect `(nil ,(rust-re-item-def item) 1))
329+
`(("Impl" ,(rust-re-item-def "impl") 1)))
330+
"Value for `imenu-generic-expression' in Rust mode.
331+
332+
Create a flat index of the item definitions in a Rust file.
333+
334+
Imenu will show all the enums, structs, etc. at the same level.
335+
Implementations will be shown under the `Impl` subheading.
336+
Use idomenu (imenu with ido-mode) for best mileage.")
337+
324338
;; For compatibility with Emacs < 24, derive conditionally
325339
(defalias 'rust-parent-mode
326340
(if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
@@ -348,7 +362,7 @@
348362
(set (make-local-variable 'indent-tabs-mode) nil)
349363

350364
;; Allow paragraph fills for comments
351-
(set (make-local-variable 'comment-start-skip)
365+
(set (make-local-variable 'comment-start-skip)
352366
"\\(?://[/!]*\\|/\\*[*!]?\\)[[:space:]]*")
353367
(set (make-local-variable 'paragraph-start)
354368
(concat "[[:space:]]*\\(?:" comment-start-skip "\\|\\*/?[[:space:]]*\\|\\)$"))
@@ -359,6 +373,7 @@
359373
(set (make-local-variable 'adaptive-fill-function) 'rust-find-fill-prefix)
360374
(set (make-local-variable 'comment-multi-line) t)
361375
(set (make-local-variable 'comment-line-break-function) 'rust-comment-indent-new-line)
376+
(set (make-local-variable 'imenu-generic-expression) rust-imenu-generic-expression)
362377
)
363378

364379

branches/auto/src/etc/extract-tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#[ allow(dead_assignment) ];\n
6565
#[ allow(unused_mut) ];\n
6666
#[ allow(attribute_usage) ];\n
67+
#[ allow(dead_code) ];\n
6768
#[ feature(macro_rules, globs, struct_variant, managed_boxes) ];\n
6869
""" + block
6970
if xfail:

branches/auto/src/libextra/bitv.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,9 @@ impl Bitv {
382382
#[inline]
383383
pub fn negate(&mut self) {
384384
match self.rep {
385-
Small(ref mut b) => b.negate(),
386-
Big(ref mut s) => {
387-
s.each_storage(|w| { *w = !*w; true });
388-
}
389-
}
385+
Small(ref mut s) => s.negate(),
386+
Big(ref mut b) => b.negate(),
387+
}
390388
}
391389

392390
/**

0 commit comments

Comments
 (0)