Skip to content

Commit 8fde6dc

Browse files
committed
---
yaml --- r: 143923 b: refs/heads/try2 c: 1ceee6a h: refs/heads/master i: 143921: 1acacd8 143919: a3844c2 v: v3
1 parent c28a262 commit 8fde6dc

File tree

257 files changed

+3220
-5554
lines changed

Some content is hidden

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

257 files changed

+3220
-5554
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0d817ee869387322dec4d3f7d407dcc9f91c2632
8+
refs/heads/try2: 1ceee6a8433deb1ebcc76cbac2c1eb64b91d68df
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ opt docs 1 "build documentation"
371371
opt optimize 1 "build optimized rust code"
372372
opt optimize-cxx 1 "build optimized C++ code"
373373
opt optimize-llvm 1 "build optimized LLVM"
374-
opt optimize-tests 1 "build tests with optimizations"
375374
opt llvm-assertions 1 "build LLVM with assertions"
376375
opt debug 0 "build with extra debug fun"
377376
opt ratchet-bench 0 "ratchet benchmarks"

branches/try2/doc/rustpkg.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ When building a package that is in a `git` repository,
103103
When building a package that is not under version control,
104104
or that has no tags, `rustpkg` assumes the intended version is 0.1.
105105

106-
> **Note:** A future version of rustpkg will support semantic versions.
107-
> Also, a future version will add the option to specify a version with a metadata
108-
> attribute like `#[link(vers = "3.1415")]` inside the crate module,
109-
> though this attribute will never be mandatory.
110-
111106
# Dependencies
112107

113108
rustpkg infers dependencies from `extern mod` directives.

branches/try2/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ match crayons[0] {
13051305
A vector can be destructured using pattern matching:
13061306
13071307
~~~~
1308-
let numbers: &[int] = &[1, 2, 3];
1308+
let numbers: [int, ..3] = [1, 2, 3];
13091309
let score = match numbers {
13101310
[] => 0,
13111311
[a] => a * 10,
@@ -2195,7 +2195,7 @@ use std::float::consts::pi;
21952195
# impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } }
21962196
21972197
let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};
2198-
let mycircle: @Circle = concrete as @Circle;
2198+
let mycircle: Circle = concrete as @Circle;
21992199
let nonsense = mycircle.radius() * mycircle.area();
22002200
~~~
22012201

branches/try2/mk/tests.mk

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -552,15 +552,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
552552

553553
# The tests select when to use debug configuration on their own;
554554
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
555-
CTEST_RUSTC_FLAGS := $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
556-
557-
# The tests can not be optimized while the rest of the compiler is optimized, so
558-
# filter out the optimization (if any) from rustc and then figure out if we need
559-
# to be optimized
560-
CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
561-
ifndef CFG_DISABLE_OPTIMIZE_TESTS
562-
CTEST_RUSTC_FLAGS += -O
563-
endif
555+
CTEST_RUSTC_FLAGS = $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
564556

565557
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
566558
--compile-lib-path $$(HLIB$(1)_H_$(3)) \

branches/try2/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fn parse_check_line(line: &str) -> Option<~str> {
142142
fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
143143
do parse_name_value_directive(line, ~"exec-env").map |nv| {
144144
// nv is either FOO or FOO=BAR
145-
let mut strs: ~[~str] = nv.splitn_iter('=', 1).map(|s| s.to_owned()).collect();
145+
let mut strs: ~[~str] = nv.splitn_iter('=', 1).transform(|s| s.to_owned()).collect();
146146

147147
match strs.len() {
148148
1u => (strs.pop(), ~""),

branches/try2/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
350350
fatal(~"process did not return an error status");
351351
}
352352

353-
let prefixes = expected_errors.iter().map(|ee| {
353+
let prefixes = expected_errors.iter().transform(|ee| {
354354
fmt!("%s:%u:", testfile.to_str(), ee.line)
355355
}).collect::<~[~str]>();
356356

357357
fn to_lower( s : &str ) -> ~str {
358358
let i = s.iter();
359-
let c : ~[char] = i.map( |c| {
359+
let c : ~[char] = i.transform( |c| {
360360
if c.is_ascii() {
361361
c.to_ascii().to_lower().to_char()
362362
} else {
@@ -760,7 +760,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
760760
let cmdline = make_cmdline("", args.prog, args.args);
761761

762762
// get bare program string
763-
let mut tvec: ~[~str] = args.prog.split_iter('/').map(|ts| ts.to_owned()).collect();
763+
let mut tvec: ~[~str] = args.prog.split_iter('/').transform(|ts| ts.to_owned()).collect();
764764
let prog_short = tvec.pop();
765765

766766
// copy to target
@@ -938,7 +938,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
938938

939939
fn count_extracted_lines(p: &Path) -> uint {
940940
let x = io::read_whole_file_str(&p.with_filetype("ll")).unwrap();
941-
x.line_iter().len()
941+
x.line_iter().len_()
942942
}
943943

944944

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929

3030
table))
3131

32-
(defcustom rust-indent-offset default-tab-width
33-
"*Indent Rust code by this number of spaces.
34-
35-
The initializer is `DEFAULT-TAB-WIDTH'.")
36-
3732
(defun rust-paren-level () (nth 0 (syntax-ppss)))
3833
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
3934
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss))))
@@ -54,10 +49,10 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
5449
(let ((level (rust-paren-level)))
5550
(cond
5651
;; A function return type is 1 level indented
57-
((looking-at "->") (* rust-indent-offset (+ level 1)))
52+
((looking-at "->") (* default-tab-width (+ level 1)))
5853

5954
;; A closing brace is 1 level unindended
60-
((looking-at "}") (* rust-indent-offset (- level 1)))
55+
((looking-at "}") (* default-tab-width (- level 1)))
6156

6257
;; If we're in any other token-tree / sexp, then:
6358
;; - [ or ( means line up with the opening token
@@ -75,18 +70,18 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
7570
(goto-char pt)
7671
(back-to-indentation)
7772
(if (looking-at "\\<else\\>")
78-
(* rust-indent-offset (+ 1 level))
73+
(* default-tab-width (+ 1 level))
7974
(progn
8075
(goto-char pt)
8176
(beginning-of-line)
8277
(rust-rewind-irrelevant)
8378
(end-of-line)
8479
(if (looking-back "[{};,]")
85-
(* rust-indent-offset level)
80+
(* default-tab-width level)
8681
(back-to-indentation)
8782
(if (looking-at "#")
88-
(* rust-indent-offset level)
89-
(* rust-indent-offset (+ 1 level))))))))))
83+
(* default-tab-width level)
84+
(* default-tab-width (+ 1 level))))))))))
9085

9186
;; Otherwise we're in a column-zero definition
9287
(t 0))))))

branches/try2/src/etc/zsh/_rust

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ _rustc_opts_switches=(
2727
--sysroot'[Override the system root]'
2828
--test'[Build a test harness]'
2929
--target'[Target triple cpu-manufacturer-kernel\[-os\] to compile]'
30-
--target-cpu'[Select target processor (llc -mcpu=help for details)]'
31-
--target-feature'[Target specific attributes (llc -mattr=help for details)]'
30+
--target-feature'[Target specific attributes (llc -mattr=help for detail)]'
3231
--android-cross-path'[The path to the Android NDK]'
3332
{-v,--version}'[Print version info and exit]'
3433
)

branches/try2/src/libextra/bitv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ impl BitvSet {
869869
let min = num::min(self.bitv.storage.len(), other.bitv.storage.len());
870870
self.bitv.storage.slice(0, min).iter().enumerate()
871871
.zip(Repeat::new(&other.bitv.storage))
872-
.map(|((i, &w), o_store)| (i * uint::bits, w, o_store[i]))
872+
.transform(|((i, &w), o_store)| (i * uint::bits, w, o_store[i]))
873873
}
874874

875875
/// Visits each word in self or other that extends beyond the other. This
@@ -888,11 +888,11 @@ impl BitvSet {
888888
if olen < slen {
889889
self.bitv.storage.slice_from(olen).iter().enumerate()
890890
.zip(Repeat::new(olen))
891-
.map(|((i, &w), min)| (true, (i + min) * uint::bits, w))
891+
.transform(|((i, &w), min)| (true, (i + min) * uint::bits, w))
892892
} else {
893893
other.bitv.storage.slice_from(slen).iter().enumerate()
894894
.zip(Repeat::new(slen))
895-
.map(|((i, &w), min)| (false, (i + min) * uint::bits, w))
895+
.transform(|((i, &w), min)| (false, (i + min) * uint::bits, w))
896896
}
897897
}
898898
}

branches/try2/src/libextra/crypto/sha1.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Sha1 {
159159
}
160160

161161
impl Digest for Sha1 {
162-
fn reset(&mut self) {
162+
pub fn reset(&mut self) {
163163
self.length_bits = 0;
164164
self.h[0] = 0x67452301u32;
165165
self.h[1] = 0xEFCDAB89u32;
@@ -169,9 +169,9 @@ impl Digest for Sha1 {
169169
self.buffer.reset();
170170
self.computed = false;
171171
}
172-
fn input(&mut self, msg: &[u8]) { add_input(self, msg); }
173-
fn result(&mut self, out: &mut [u8]) { return mk_result(self, out); }
174-
fn output_bits(&self) -> uint { 160 }
172+
pub fn input(&mut self, msg: &[u8]) { add_input(self, msg); }
173+
pub fn result(&mut self, out: &mut [u8]) { return mk_result(self, out); }
174+
pub fn output_bits(&self) -> uint { 160 }
175175
}
176176

177177
#[cfg(test)]

0 commit comments

Comments
 (0)