Skip to content

Commit 3a3336b

Browse files
committed
---
yaml --- r: 37225 b: refs/heads/try c: 9406f81 h: refs/heads/master i: 37223: 5db4e7a v: v3
1 parent 44291b2 commit 3a3336b

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 09bb07bed9166105ea961a42b5fff7739ae0d2e9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5-
refs/heads/try: f1e5b36ab25a6a6c64dac21868cb8f9550c87901
5+
refs/heads/try: 9406f8101dd32b4458b8c042a1bfb1bb150a2276
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/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)