Skip to content

Commit 6d9dd05

Browse files
committed
Get rid of warnings from instantiating typarams with non-implicitly copyable types.
1 parent 4d5d43b commit 6d9dd05

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

src/cargo/cargo.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// cargo.rs - Rust package manager
22

3+
#[warn(no_non_implicitly_copyable_typarams)];
4+
35
import syntax::{ast, codemap};
46
import syntax::parse;
57
import rustc::metadata::filesearch::{get_cargo_root, get_cargo_root_nearest,
@@ -1169,4 +1171,4 @@ fn main(argv: [str]) {
11691171
"usage" { cmd_usage(); }
11701172
_ { cmd_usage(); }
11711173
}
1172-
}
1174+
}

src/libstd/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn run_tests(opts: test_opts, tests: [test_desc],
290290

291291
while done_idx < total {
292292
while wait_idx < concurrency && run_idx < total {
293-
let test = vec::shift(filtered_tests);
293+
let test = copy filtered_tests[run_idx];
294294
if concurrency == 1u {
295295
// We are doing one test at a time so we can print the name
296296
// of the test before we run it. Useful for debugging tests
@@ -327,6 +327,7 @@ fn get_concurrency() -> uint {
327327
else { threads * sched_overcommit }
328328
}
329329

330+
#[warn(no_non_implicitly_copyable_typarams)]
330331
fn filter_tests(opts: test_opts,
331332
tests: [test_desc]) -> [test_desc] {
332333
let mut filtered = copy tests;

src/rustc/middle/alias.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ fn check_call(cx: @ctx, sc: scope, f: @ast::expr, args: [@ast::expr],
323323
}
324324
}
325325

326+
#[warn(no_non_implicitly_copyable_typarams)]
326327
fn check_alt(cx: ctx, input: @ast::expr, arms: [ast::arm], sc: scope,
327328
v: vt<scope>) {
328329
v.visit_expr(input, sc, v);

src/rustdoc/path_pass.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type ctxt = {
1616
mut path: [str]
1717
};
1818

19+
#[warn(no_non_implicitly_copyable_typarams)]
1920
fn run(srv: astsrv::srv, doc: doc::doc) -> doc::doc {
2021
let ctxt = {
2122
srv: srv,
@@ -37,6 +38,7 @@ fn fold_item(fold: fold::fold<ctxt>, doc: doc::itemdoc) -> doc::itemdoc {
3738
}
3839
}
3940

41+
#[warn(no_non_implicitly_copyable_typarams)]
4042
fn fold_mod(fold: fold::fold<ctxt>, doc: doc::moddoc) -> doc::moddoc {
4143
let is_topmod = doc.id() == ast::crate_node_id;
4244

@@ -102,4 +104,4 @@ fn should_record_native_fn_paths() {
102104
let doc = run(srv, doc);
103105
assert doc.cratemod().nmods()[0].fns[0].path() == ["a"];
104106
}
105-
}
107+
}

src/rustdoc/sort_pass.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ fn mk_pass(name: str, +lteq: item_lteq) -> pass {
1515
}
1616
}
1717

18+
#[warn(no_non_implicitly_copyable_typarams)]
1819
fn run(
1920
_srv: astsrv::srv,
2021
doc: doc::doc,
@@ -27,6 +28,7 @@ fn run(
2728
fold.fold_doc(fold, doc)
2829
}
2930

31+
#[warn(no_non_implicitly_copyable_typarams)]
3032
fn fold_mod(
3133
fold: fold::fold<item_lteq>,
3234
doc: doc::moddoc

src/rustdoc/text_pass.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ fn mk_pass(name: str, +op: fn~(str) -> str) -> pass {
1313

1414
type op = fn~(str) -> str;
1515

16+
#[warn(no_non_implicitly_copyable_typarams)]
1617
fn run(
1718
_srv: astsrv::srv,
1819
doc: doc::doc,

0 commit comments

Comments
 (0)