@@ -86,9 +86,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
8686 self . emit_type_mismatch_suggestions ( err, expr, expr_ty, expected, expected_ty_expr, error) ;
8787 self . note_type_is_not_clone ( err, expected, expr_ty, expr) ;
8888 self . note_internal_mutation_in_method ( err, expr, Some ( expected) , expr_ty) ;
89- self . check_for_range_as_method_call ( err, expr, expr_ty, expected) ;
90- self . check_for_binding_assigned_block_without_tail_expression ( err, expr, expr_ty, expected) ;
91- self . check_wrong_return_type_due_to_generic_arg ( err, expr, expr_ty) ;
89+ self . suggest_method_call_on_range_literal ( err, expr, expr_ty, expected) ;
90+ self . suggest_return_binding_for_missing_tail_expr ( err, expr, expr_ty, expected) ;
91+ self . note_wrong_return_ty_due_to_generic_arg ( err, expr, expr_ty) ;
9292 }
9393
9494 /// Requires that the two types unify, and prints an error message if
@@ -1217,7 +1217,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
12171217 /// In addition of this check, it also checks between references mutability state. If the
12181218 /// expected is mutable but the provided isn't, maybe we could just say "Hey, try with
12191219 /// `&mut`!".
1220- pub fn check_ref (
1220+ pub fn suggest_deref_or_ref (
12211221 & self ,
12221222 expr : & hir:: Expr < ' tcx > ,
12231223 checked_ty : Ty < ' tcx > ,
@@ -1572,7 +1572,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
15721572 None
15731573 }
15741574
1575- pub fn check_for_cast (
1575+ pub fn suggest_cast (
15761576 & self ,
15771577 err : & mut Diagnostic ,
15781578 expr : & hir:: Expr < ' _ > ,
@@ -1939,7 +1939,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
19391939 }
19401940
19411941 /// Identify when the user has written `foo..bar()` instead of `foo.bar()`.
1942- pub fn check_for_range_as_method_call (
1942+ pub fn suggest_method_call_on_range_literal (
19431943 & self ,
19441944 err : & mut Diagnostic ,
19451945 expr : & hir:: Expr < ' tcx > ,
@@ -2008,7 +2008,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20082008
20092009 /// Identify when the type error is because `()` is found in a binding that was assigned a
20102010 /// block without a tail expression.
2011- fn check_for_binding_assigned_block_without_tail_expression (
2011+ fn suggest_return_binding_for_missing_tail_expr (
20122012 & self ,
20132013 err : & mut Diagnostic ,
20142014 expr : & hir:: Expr < ' _ > ,
@@ -2050,7 +2050,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
20502050 }
20512051 }
20522052
2053- fn check_wrong_return_type_due_to_generic_arg (
2053+ fn note_wrong_return_ty_due_to_generic_arg (
20542054 & self ,
20552055 err : & mut Diagnostic ,
20562056 expr : & hir:: Expr < ' _ > ,
0 commit comments