Skip to content

Commit d904179

Browse files
committed
Removing do keyword from librustpkg
1 parent 518a5e0 commit d904179

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/librustpkg/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,14 +799,14 @@ pub fn main_args(args: &[~str]) -> int {
799799
debug!("Will store workcache in {}", ws.display());
800800

801801
// Wrap the rest in task::try in case of a condition failure in a task
802-
let result = do task::try {
802+
let result = task::try(proc() {
803803
BuildContext {
804804
context: context,
805805
sysroot: sysroot.clone(), // Currently, only tests override this
806806
workcache_context: api::default_context(sysroot.clone(),
807807
default_workspace()).workcache_context
808808
}.run(command, args.clone())
809-
};
809+
});
810810
// FIXME #9262: This is using the same error code for all errors,
811811
// and at least one test case succeeds if rustpkg returns COPY_FAILED_CODE,
812812
// when actually, it might set the exit code for that even if a different

src/librustpkg/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,13 @@ fn test_install_invalid() {
607607
let ctxt = fake_ctxt(sysroot, &temp_workspace);
608608

609609
// Uses task::try because of #9001
610-
let result = do task::try {
610+
let result = task::try(proc() {
611611
let pkg_src = PkgSrc::new(temp_workspace.clone(),
612612
temp_workspace.clone(),
613613
false,
614614
crateid.clone());
615615
ctxt.install(pkg_src, &WhatToBuild::new(MaybeCustom, Everything));
616-
};
616+
});
617617
assert!(result.unwrap_err()
618618
.to_str().contains("supplied path for package dir does not exist"));
619619
}

src/librustpkg/testsuite/pass/src/c-dependencies/pkg.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub fn main() {
5050
prep.declare_input("file",
5151
foo_c_name.as_str().unwrap().to_owned(),
5252
digest_file_with_date(&foo_c_name));
53-
let out_path = do prep.exec |exec| {
53+
let out_path = prep.exec(|exec| {
5454
let out_path = api::build_library_in_workspace(exec,
5555
&mut sub_cx.clone(),
5656
"cdep",
@@ -60,22 +60,22 @@ pub fn main() {
6060
"foo");
6161
let out_p = Path::new(out_path.unwrap());
6262
out_p.as_str().unwrap().to_owned()
63-
};
63+
});
6464
out_path
6565
});
6666
let out_lib_path = Path::new(out_lib_path);
6767
debug!("out_lib_path = {}", out_lib_path.display());
6868
context.add_library_path(out_lib_path.dir_path());
6969

7070
let context_clone = context.clone();
71-
let task_res = do task::try {
71+
let task_res = task::try(proc() {
7272
let mut cc = context_clone.clone();
7373
api::install_pkg(&mut cc,
7474
os::getcwd(),
7575
~"cdep",
7676
None,
7777
~[(~"binary", out_lib_path.clone()), (~"file", foo_c_name.clone())]);
78-
};
78+
});
7979

8080
if task_res.is_err() {
8181
os::set_exit_status(COPY_FAILED_CODE);

0 commit comments

Comments
 (0)