This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed
compiler/rustc_trait_selection/src/traits/error_reporting Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -4769,21 +4769,15 @@ pub(super) fn get_explanation_based_on_obligation<'tcx>(
47694769 } else {
47704770 String :: new ( )
47714771 } ;
4772- match ty_desc {
4773- Some ( desc) => format ! (
4774- "{}the trait `{}` is not implemented for {} `{}`{post}" ,
4775- pre_message,
4776- trait_predicate. print_modifiers_and_trait_path( ) ,
4777- desc,
4778- tcx. short_ty_string( trait_ref. skip_binder( ) . self_ty( ) , & mut None ) ,
4779- ) ,
4780- None => format ! (
4781- "{}the trait `{}` is not implemented for `{}`{post}" ,
4782- pre_message,
4783- trait_predicate. print_modifiers_and_trait_path( ) ,
4784- tcx. short_ty_string( trait_ref. skip_binder( ) . self_ty( ) , & mut None ) ,
4785- ) ,
4786- }
4772+ let desc = match ty_desc {
4773+ Some ( desc) => format ! ( " {desc}" ) ,
4774+ None => String :: new ( ) ,
4775+ } ;
4776+ format ! (
4777+ "{pre_message}the trait `{}` is not implemented for{desc} `{}`{post}" ,
4778+ trait_predicate. print_modifiers_and_trait_path( ) ,
4779+ tcx. short_ty_string( trait_ref. skip_binder( ) . self_ty( ) , & mut None ) ,
4780+ )
47874781 }
47884782}
47894783
You can’t perform that action at this time.
0 commit comments