diff options
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/package_source.rs | 2 | ||||
| -rw-r--r-- | src/librustpkg/path_util.rs | 12 | ||||
| -rw-r--r-- | src/librustpkg/util.rs | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/librustpkg/package_source.rs b/src/librustpkg/package_source.rs index b2f608bd352..54ad888e2ae 100644 --- a/src/librustpkg/package_source.rs +++ b/src/librustpkg/package_source.rs @@ -202,7 +202,7 @@ impl PkgSrc { crates: &[Crate], cfgs: &[~str], what: OutputType) { - for crates.iter().advance |&crate| { + for crates.iter().advance |crate| { let path = &src_dir.push_rel(&crate.file).normalize(); note(fmt!("build_crates: compiling %s", path.to_str())); note(fmt!("build_crates: destination dir is %s", dst_dir.to_str())); diff --git a/src/librustpkg/path_util.rs b/src/librustpkg/path_util.rs index b8f77ceecec..c6f7735b204 100644 --- a/src/librustpkg/path_util.rs +++ b/src/librustpkg/path_util.rs @@ -71,8 +71,8 @@ pub fn make_dir_rwx(p: &Path) -> bool { os::make_dir(p, U_RWX) } pub fn workspace_contains_package_id(pkgid: &PkgId, workspace: &Path) -> bool { let src_dir = workspace.push("src"); let dirs = os::list_dir(&src_dir); - for dirs.iter().advance |&p| { - let p = Path(p); + for dirs.iter().advance |p| { + let p = Path(copy *p); debug!("=> p = %s", p.to_str()); if !os::path_is_dir(&src_dir.push_rel(&p)) { loop; @@ -84,8 +84,8 @@ pub fn workspace_contains_package_id(pkgid: &PkgId, workspace: &Path) -> bool { } else { let pf = p.filename(); - for pf.iter().advance |&pf| { - let f_ = copy pf; + for pf.iter().advance |pf| { + let f_ = copy *pf; let g = f_.to_str(); match split_version_general(g, '-') { Some((ref might_match, ref vers)) => { @@ -217,10 +217,10 @@ pub fn library_in_workspace(path: &LocalPath, short_name: &str, where: Target, debug!("lib_prefix = %s and lib_filetype = %s", lib_prefix, lib_filetype); let mut result_filename = None; - for dir_contents.iter().advance |&p| { + for dir_contents.iter().advance |p| { let mut which = 0; let mut hash = None; - let p_path = Path(p); + let p_path = Path(copy *p); let extension = p_path.filetype(); debug!("p = %s, p's extension is %?", p.to_str(), extension); match extension { diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index 900ef4896ca..da5c98680b9 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -194,7 +194,7 @@ pub fn compile_input(ctxt: &Ctx, Main => ~[] } + flags - + cfgs.flat_map(|&c| { ~[~"--cfg", c] }), + + cfgs.flat_map(|c| { ~[~"--cfg", copy *c] }), driver::optgroups()).get(); let options = @session::options { crate_type: crate_type, @@ -311,8 +311,8 @@ pub fn compile_crate(ctxt: &Ctx, pkg_id: &PkgId, what: OutputType) -> bool { debug!("compile_crate: crate=%s, dir=%s", crate.to_str(), dir.to_str()); debug!("compile_crate: short_name = %s, flags =...", pkg_id.to_str()); - for flags.iter().advance |&fl| { - debug!("+++ %s", fl); + for flags.iter().advance |fl| { + debug!("+++ %s", *fl); } compile_input(ctxt, pkg_id, crate, dir, flags, cfgs, opt, what) } |
