Skip to content

Commit 09d57bc

Browse files
committed
---
yaml --- r: 40547 b: refs/heads/dist-snap c: 082a88e h: refs/heads/master i: 40545: 8234dff 40543: ef53940 v: v3
1 parent 98da470 commit 09d57bc

File tree

11 files changed

+69
-54
lines changed

11 files changed

+69
-54
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 19f5f91c045ab54fc981029ebb2a9b7d271b7589
10+
refs/heads/dist-snap: 082a88e42cdefce78a8f1f869971bbabd74ebca2
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ fn parse_config(args: ~[~str]) -> config {
3535
assert (vec::is_not_empty(args));
3636
let args_ = vec::tail(args);
3737
let matches =
38-
match getopts::getopts(args_, opts) {
38+
&match getopts::getopts(args_, opts) {
3939
Ok(m) => m,
4040
Err(f) => fail getopts::fail_str(f)
4141
};
4242

43-
fn opt_path(m: getopts::Matches, nm: ~str) -> Path {
43+
fn opt_path(m: &getopts::Matches, nm: ~str) -> Path {
4444
Path(getopts::opt_str(m, nm))
4545
}
4646

branches/dist-snap/src/libcargo/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ fn load_source_packages(c: &Cargo, src: @Source) {
661661
}
662662

663663
fn build_cargo_options(argv: ~[~str]) -> Options {
664-
let matches = match getopts::getopts(argv, opts()) {
664+
let matches = &match getopts::getopts(argv, opts()) {
665665
result::Ok(m) => m,
666666
result::Err(f) => {
667667
fail fmt!("%s", getopts::fail_str(f));

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ fn host_triple() -> ~str {
458458
}
459459

460460
fn build_session_options(binary: ~str,
461-
matches: getopts::Matches,
461+
matches: &getopts::Matches,
462462
demitter: diagnostic::emitter) -> @session::options {
463463
let crate_type = if opt_present(matches, ~"lib") {
464464
session::lib_crate
@@ -807,7 +807,7 @@ mod test {
807807
#[test]
808808
fn test_switch_implies_cfg_test() {
809809
let matches =
810-
match getopts(~[~"--test"], optgroups()) {
810+
&match getopts(~[~"--test"], optgroups()) {
811811
Ok(m) => m,
812812
Err(f) => fail ~"test_switch_implies_cfg_test: " +
813813
getopts::fail_str(f)
@@ -824,7 +824,7 @@ mod test {
824824
#[test]
825825
fn test_switch_implies_cfg_test_unless_cfg_test() {
826826
let matches =
827-
match getopts(~[~"--test", ~"--cfg=test"], optgroups()) {
827+
&match getopts(~[~"--test", ~"--cfg=test"], optgroups()) {
828828
Ok(m) => m,
829829
Err(f) => {
830830
fail ~"test_switch_implies_cfg_test_unless_cfg_test: " +

branches/dist-snap/src/librustc/middle/typeck/infer/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct RH {
3434
}
3535

3636
fn setup_env(test_name: &str, source_string: &str) -> Env {
37-
let matches = getopts(~[~"-Z", ~"verbose"], optgroups()).get();
37+
let matches = &getopts(~[~"-Z", ~"verbose"], optgroups()).get();
3838
let sessopts = build_session_options(~"rustc", matches, diagnostic::emit);
3939
let sess = build_session(sessopts, diagnostic::emit);
4040
let cfg = build_configuration(sess, ~"whatever", str_input(~""));

branches/dist-snap/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ fn run_compiler(args: &~[~str], demitter: diagnostic::emitter) {
8585
if args.is_empty() { usage(binary); return; }
8686

8787
let matches =
88-
match getopts::groups::getopts(args, optgroups()) {
88+
&match getopts::groups::getopts(args, optgroups()) {
8989
Ok(m) => m,
9090
Err(f) => {
9191
early_error(demitter, getopts::fail_str(f))

branches/dist-snap/src/librustdoc/config.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ fn parse_config_(
128128
args: &[~str],
129129
+program_output: ProgramOutput
130130
) -> Result<Config, ~str> {
131-
let args = vec::tail(args);
131+
let args = args.tail();
132132
let opts = vec::unzip(opts()).first();
133133
match getopts::getopts(args, opts) {
134134
result::Ok(matches) => {
135-
if vec::len(matches.free) == 1u {
135+
if matches.free.len() == 1 {
136136
let input_crate = Path(vec::head(matches.free));
137-
config_from_opts(&input_crate, matches, move program_output)
138-
} else if vec::is_empty(matches.free) {
137+
config_from_opts(&input_crate, &matches, move program_output)
138+
} else if matches.free.is_empty() {
139139
result::Err(~"no crates specified")
140140
} else {
141141
result::Err(~"multiple crates specified")
@@ -149,7 +149,7 @@ fn parse_config_(
149149

150150
fn config_from_opts(
151151
input_crate: &Path,
152-
+matches: getopts::Matches,
152+
matches: &getopts::Matches,
153153
+program_output: ProgramOutput
154154
) -> Result<Config, ~str> {
155155

0 commit comments

Comments
 (0)