Skip to content

Commit 45d0b5f

Browse files
committed
rustc: Reword field/method-not-found error message to mention the possibility that a field wasn't found
1 parent 83ed4f4 commit 45d0b5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustc/middle/typeck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
27552755
none {
27562756
let t_err = resolve_type_vars_if_possible(fcx, expr_t);
27572757
let msg = #fmt["attempted access of field %s on type %s, but \
2758-
no method implementation was found",
2758+
no field or method with that name was found",
27592759
field, ty_to_str(tcx, t_err)];
27602760
tcx.sess.span_err(expr.span, msg);
27612761
// NB: Adding a bogus type to allow typechecking to continue

0 commit comments

Comments
 (0)