@@ -86,9 +86,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
86
86
self . emit_type_mismatch_suggestions ( err, expr, expr_ty, expected, expected_ty_expr, error) ;
87
87
self . note_type_is_not_clone ( err, expected, expr_ty, expr) ;
88
88
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) ;
92
92
}
93
93
94
94
/// Requires that the two types unify, and prints an error message if
@@ -1217,7 +1217,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1217
1217
/// In addition of this check, it also checks between references mutability state. If the
1218
1218
/// expected is mutable but the provided isn't, maybe we could just say "Hey, try with
1219
1219
/// `&mut`!".
1220
- pub fn check_ref (
1220
+ pub fn suggest_deref_or_ref (
1221
1221
& self ,
1222
1222
expr : & hir:: Expr < ' tcx > ,
1223
1223
checked_ty : Ty < ' tcx > ,
@@ -1572,7 +1572,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1572
1572
None
1573
1573
}
1574
1574
1575
- pub fn check_for_cast (
1575
+ pub fn suggest_cast (
1576
1576
& self ,
1577
1577
err : & mut Diagnostic ,
1578
1578
expr : & hir:: Expr < ' _ > ,
@@ -1942,7 +1942,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
1942
1942
}
1943
1943
1944
1944
/// Identify when the user has written `foo..bar()` instead of `foo.bar()`.
1945
- pub fn check_for_range_as_method_call (
1945
+ pub fn suggest_method_call_on_range_literal (
1946
1946
& self ,
1947
1947
err : & mut Diagnostic ,
1948
1948
expr : & hir:: Expr < ' tcx > ,
@@ -2011,7 +2011,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
2011
2011
2012
2012
/// Identify when the type error is because `()` is found in a binding that was assigned a
2013
2013
/// block without a tail expression.
2014
- fn check_for_binding_assigned_block_without_tail_expression (
2014
+ fn suggest_return_binding_for_missing_tail_expr (
2015
2015
& self ,
2016
2016
err : & mut Diagnostic ,
2017
2017
expr : & hir:: Expr < ' _ > ,
@@ -2053,7 +2053,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
2053
2053
}
2054
2054
}
2055
2055
2056
- fn check_wrong_return_type_due_to_generic_arg (
2056
+ fn note_wrong_return_ty_due_to_generic_arg (
2057
2057
& self ,
2058
2058
err : & mut Diagnostic ,
2059
2059
expr : & hir:: Expr < ' _ > ,
0 commit comments