Skip to content

Commit 682e746

Browse files
committed
Patch up some new errors from rustpkg
1 parent 59083d2 commit 682e746

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/librustpkg/package_source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl PkgSrc {
202202
crates: &[Crate],
203203
cfgs: &[~str],
204204
what: OutputType) {
205-
for crates.iter().advance |&crate| {
205+
for crates.iter().advance |crate| {
206206
let path = &src_dir.push_rel(&crate.file).normalize();
207207
note(fmt!("build_crates: compiling %s", path.to_str()));
208208
note(fmt!("build_crates: destination dir is %s", dst_dir.to_str()));

src/librustpkg/path_util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ pub fn make_dir_rwx(p: &Path) -> bool { os::make_dir(p, U_RWX) }
7171
pub fn workspace_contains_package_id(pkgid: &PkgId, workspace: &Path) -> bool {
7272
let src_dir = workspace.push("src");
7373
let dirs = os::list_dir(&src_dir);
74-
for dirs.iter().advance |&p| {
75-
let p = Path(p);
74+
for dirs.iter().advance |p| {
75+
let p = Path(copy *p);
7676
debug!("=> p = %s", p.to_str());
7777
if !os::path_is_dir(&src_dir.push_rel(&p)) {
7878
loop;
@@ -84,8 +84,8 @@ pub fn workspace_contains_package_id(pkgid: &PkgId, workspace: &Path) -> bool {
8484
}
8585
else {
8686
let pf = p.filename();
87-
for pf.iter().advance |&pf| {
88-
let f_ = copy pf;
87+
for pf.iter().advance |pf| {
88+
let f_ = copy *pf;
8989
let g = f_.to_str();
9090
match split_version_general(g, '-') {
9191
Some((ref might_match, ref vers)) => {
@@ -217,10 +217,10 @@ pub fn library_in_workspace(path: &LocalPath, short_name: &str, where: Target,
217217
debug!("lib_prefix = %s and lib_filetype = %s", lib_prefix, lib_filetype);
218218

219219
let mut result_filename = None;
220-
for dir_contents.iter().advance |&p| {
220+
for dir_contents.iter().advance |p| {
221221
let mut which = 0;
222222
let mut hash = None;
223-
let p_path = Path(p);
223+
let p_path = Path(copy *p);
224224
let extension = p_path.filetype();
225225
debug!("p = %s, p's extension is %?", p.to_str(), extension);
226226
match extension {

src/librustpkg/util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn compile_input(ctxt: &Ctx,
194194
Main => ~[]
195195
}
196196
+ flags
197-
+ cfgs.flat_map(|&c| { ~[~"--cfg", c] }),
197+
+ cfgs.flat_map(|c| { ~[~"--cfg", copy *c] }),
198198
driver::optgroups()).get();
199199
let options = @session::options {
200200
crate_type: crate_type,
@@ -311,8 +311,8 @@ pub fn compile_crate(ctxt: &Ctx, pkg_id: &PkgId,
311311
what: OutputType) -> bool {
312312
debug!("compile_crate: crate=%s, dir=%s", crate.to_str(), dir.to_str());
313313
debug!("compile_crate: short_name = %s, flags =...", pkg_id.to_str());
314-
for flags.iter().advance |&fl| {
315-
debug!("+++ %s", fl);
314+
for flags.iter().advance |fl| {
315+
debug!("+++ %s", *fl);
316316
}
317317
compile_input(ctxt, pkg_id, crate, dir, flags, cfgs, opt, what)
318318
}

0 commit comments

Comments
 (0)