Skip to content

Commit 468989e

Browse files
committed
---
yaml --- r: 34751 b: refs/heads/master c: 9406f81 h: refs/heads/master i: 34749: 6e1b29e 34747: 01f3e0d 34743: 404a519 34735: 4a9edf9 34719: 5cf1ece 34687: 4082df3 v: v3
1 parent d6f439e commit 468989e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f1e5b36ab25a6a6c64dac21868cb8f9550c87901
2+
refs/heads/master: 9406f8101dd32b4458b8c042a1bfb1bb150a2276
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024

trunk/src/rustc/middle/kind.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ use lint::{non_implicitly_copyable_typarams,implicit_copies};
3838
// primitives in the stdlib are explicitly annotated to only take sendable
3939
// types.
4040

41+
const try_adding: &str = "Try adding a move";
42+
4143
fn kind_to_str(k: kind) -> ~str {
4244
let mut kinds = ~[];
4345

@@ -217,7 +219,7 @@ fn check_block(b: blk, cx: ctx, v: visit::vt<ctx>) {
217219
match b.node.expr {
218220
Some(ex) => maybe_copy(cx, ex,
219221
Some(("Tail expressions in blocks must be copyable",
220-
"Try adding a move"))),
222+
try_adding))),
221223
_ => ()
222224
}
223225
visit::visit_block(b, cx, v);
@@ -279,11 +281,11 @@ fn check_expr(e: @expr, cx: ctx, v: visit::vt<ctx>) {
279281
expr_unary(box(_), ex) | expr_unary(uniq(_), ex) |
280282
expr_ret(Some(ex)) => {
281283
maybe_copy(cx, ex, Some(("Returned values must be copyable",
282-
"Try adding a move")));
284+
try_adding)));
283285
}
284286
expr_cast(source, _) => {
285287
maybe_copy(cx, source, Some(("Casted values must be copyable",
286-
"Try adding a move")));
288+
try_adding)));
287289
check_cast_for_escaping_regions(cx, source, e);
288290
}
289291
expr_copy(expr) => check_copy_ex(cx, expr, false,

0 commit comments

Comments
 (0)