rustc: Reword field/method-not-found error message to mention the possibility that a field wasn't found

This commit is contained in:
Patrick Walton 2012-03-14 16:02:59 -07:00
parent 83ed4f4bc4
commit 45d0b5f0b9

View File

@ -2755,7 +2755,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
none {
let t_err = resolve_type_vars_if_possible(fcx, expr_t);
let msg = #fmt["attempted access of field %s on type %s, but \
no method implementation was found",
no field or method with that name was found",
field, ty_to_str(tcx, t_err)];
tcx.sess.span_err(expr.span, msg);
// NB: Adding a bogus type to allow typechecking to continue