Skip to content

Commit

Permalink
Make error message for non-copyable args less misleading
Browse files Browse the repository at this point in the history
No review, just changing error message text.

Closes #3855
  • Loading branch information
catamorphism committed Oct 25, 2012
1 parent d6b3d65 commit 75947b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rustc/middle/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ fn check_expr(e: @expr, cx: ctx, v: visit::vt<ctx>) {
for ty::ty_fn_args(ty::expr_ty(cx.tcx, f)).eachi |i, arg_t| {
match ty::arg_mode(cx.tcx, *arg_t) {
by_copy => maybe_copy(cx, args[i],
Some(("callee takes its argument by copy", ""))),
Some(("function arguments must be copyable",
"try changing the function to take a reference \
instead"))),
by_ref | by_val | by_move => ()
}
}
Expand Down

0 comments on commit 75947b3

Please sign in to comment.