Skip to content

Commit 75947b3

Browse files
committed
Make error message for non-copyable args less misleading
No review, just changing error message text. Closes #3855
1 parent d6b3d65 commit 75947b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rustc/middle/kind.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ fn check_expr(e: @expr, cx: ctx, v: visit::vt<ctx>) {
333333
for ty::ty_fn_args(ty::expr_ty(cx.tcx, f)).eachi |i, arg_t| {
334334
match ty::arg_mode(cx.tcx, *arg_t) {
335335
by_copy => maybe_copy(cx, args[i],
336-
Some(("callee takes its argument by copy", ""))),
336+
Some(("function arguments must be copyable",
337+
"try changing the function to take a reference \
338+
instead"))),
337339
by_ref | by_val | by_move => ()
338340
}
339341
}

0 commit comments

Comments
 (0)