From 45d0b5f0b9bbcf97bc985fd26d64564273b7547a Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Wed, 14 Mar 2012 16:02:59 -0700 Subject: [PATCH] rustc: Reword field/method-not-found error message to mention the possibility that a field wasn't found --- src/rustc/middle/typeck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rustc/middle/typeck.rs b/src/rustc/middle/typeck.rs index c47a04ddb64..457fb644d46 100644 --- a/src/rustc/middle/typeck.rs +++ b/src/rustc/middle/typeck.rs @@ -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