Get rid of warnings from instantiating typarams with non-implicitly copyable types.

This commit is contained in:
Michael Sullivan 2012-06-04 14:31:25 -07:00
parent 4d5d43beae
commit 6d9dd055d1
6 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,7 @@
// cargo.rs - Rust package manager
#[warn(no_non_implicitly_copyable_typarams)];
import syntax::{ast, codemap};
import syntax::parse;
import rustc::metadata::filesearch::{get_cargo_root, get_cargo_root_nearest,
@ -1169,4 +1171,4 @@ fn main(argv: [str]) {
"usage" { cmd_usage(); }
_ { cmd_usage(); }
}
}
}

View File

@ -290,7 +290,7 @@ fn run_tests(opts: test_opts, tests: [test_desc],
while done_idx < total {
while wait_idx < concurrency && run_idx < total {
let test = vec::shift(filtered_tests);
let test = copy filtered_tests[run_idx];
if concurrency == 1u {
// We are doing one test at a time so we can print the name
// of the test before we run it. Useful for debugging tests
@ -327,6 +327,7 @@ fn get_concurrency() -> uint {
else { threads * sched_overcommit }
}
#[warn(no_non_implicitly_copyable_typarams)]
fn filter_tests(opts: test_opts,
tests: [test_desc]) -> [test_desc] {
let mut filtered = copy tests;

View File

@ -323,6 +323,7 @@ fn check_call(cx: @ctx, sc: scope, f: @ast::expr, args: [@ast::expr],
}
}
#[warn(no_non_implicitly_copyable_typarams)]
fn check_alt(cx: ctx, input: @ast::expr, arms: [ast::arm], sc: scope,
v: vt<scope>) {
v.visit_expr(input, sc, v);

View File

@ -16,6 +16,7 @@ type ctxt = {
mut path: [str]
};
#[warn(no_non_implicitly_copyable_typarams)]
fn run(srv: astsrv::srv, doc: doc::doc) -> doc::doc {
let ctxt = {
srv: srv,
@ -37,6 +38,7 @@ fn fold_item(fold: fold::fold<ctxt>, doc: doc::itemdoc) -> doc::itemdoc {
}
}
#[warn(no_non_implicitly_copyable_typarams)]
fn fold_mod(fold: fold::fold<ctxt>, doc: doc::moddoc) -> doc::moddoc {
let is_topmod = doc.id() == ast::crate_node_id;
@ -102,4 +104,4 @@ fn should_record_native_fn_paths() {
let doc = run(srv, doc);
assert doc.cratemod().nmods()[0].fns[0].path() == ["a"];
}
}
}

View File

@ -15,6 +15,7 @@ fn mk_pass(name: str, +lteq: item_lteq) -> pass {
}
}
#[warn(no_non_implicitly_copyable_typarams)]
fn run(
_srv: astsrv::srv,
doc: doc::doc,
@ -27,6 +28,7 @@ fn run(
fold.fold_doc(fold, doc)
}
#[warn(no_non_implicitly_copyable_typarams)]
fn fold_mod(
fold: fold::fold<item_lteq>,
doc: doc::moddoc

View File

@ -13,6 +13,7 @@ fn mk_pass(name: str, +op: fn~(str) -> str) -> pass {
type op = fn~(str) -> str;
#[warn(no_non_implicitly_copyable_typarams)]
fn run(
_srv: astsrv::srv,
doc: doc::doc,