Change 'ret' to 'return' in an error message

This commit is contained in:
Brian Anderson 2012-08-10 12:20:46 -07:00
parent 68bdc09650
commit 96fdad2fb7
2 changed files with 6 additions and 1 deletions

View File

@ -40,7 +40,7 @@ fn check_crate(tcx: ty::ctxt, crate: @crate) {
}
expr_ret(oe) => {
if !cx.can_ret {
tcx.sess.span_err(e.span, ~"`ret` in block function");
tcx.sess.span_err(e.span, ~"`return` in block function");
}
visit::visit_expr_opt(oe, cx, v);
}

View File

@ -0,0 +1,5 @@
fn main() {
let _x = || {
return //~ ERROR: `return` in block function
};
}