Skip to content

Commit a408294

Browse files
committed
Rename maybe_suggest_convert_to_slice fn name to consistent naming
1 parent 87e8fea commit a408294

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3032,7 +3032,7 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
30323032
self.report_similar_impl_candidates_for_root_obligation(&obligation, *trait_predicate, body_def_id, err);
30333033
}
30343034

3035-
self.maybe_suggest_convert_to_slice(
3035+
self.suggest_convert_to_slice(
30363036
err,
30373037
obligation,
30383038
trait_ref,

Diff for: compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ pub trait TypeErrCtxtExt<'tcx> {
398398
param_env: ty::ParamEnv<'tcx>,
399399
) -> Vec<Option<(Span, (DefId, Ty<'tcx>))>>;
400400

401-
fn maybe_suggest_convert_to_slice(
401+
fn suggest_convert_to_slice(
402402
&self,
403403
err: &mut Diagnostic,
404404
obligation: &PredicateObligation<'tcx>,
@@ -3955,7 +3955,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
39553955
/// If the type that failed selection is an array or a reference to an array,
39563956
/// but the trait is implemented for slices, suggest that the user converts
39573957
/// the array into a slice.
3958-
fn maybe_suggest_convert_to_slice(
3958+
fn suggest_convert_to_slice(
39593959
&self,
39603960
err: &mut Diagnostic,
39613961
obligation: &PredicateObligation<'tcx>,

0 commit comments

Comments
 (0)