Rename maybe_suggest_convert_to_slice fn name to consistent naming

This commit is contained in:
Urgau 2023-08-01 12:06:52 +02:00
parent 87e8feaf50
commit a40829498e
2 changed files with 3 additions and 3 deletions

View file

@ -3032,7 +3032,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
self.report_similar_impl_candidates_for_root_obligation(&obligation, *trait_predicate, body_def_id, err);
}
self.maybe_suggest_convert_to_slice(
self.suggest_convert_to_slice(
err,
obligation,
trait_ref,

View file

@ -398,7 +398,7 @@ pub trait TypeErrCtxtExt<'tcx> {
param_env: ty::ParamEnv<'tcx>,
) -> Vec<Option<(Span, (DefId, Ty<'tcx>))>>;
fn maybe_suggest_convert_to_slice(
fn suggest_convert_to_slice(
&self,
err: &mut Diagnostic,
obligation: &PredicateObligation<'tcx>,
@ -3955,7 +3955,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
/// If the type that failed selection is an array or a reference to an array,
/// but the trait is implemented for slices, suggest that the user converts
/// the array into a slice.
fn maybe_suggest_convert_to_slice(
fn suggest_convert_to_slice(
&self,
err: &mut Diagnostic,
obligation: &PredicateObligation<'tcx>,