File tree 1 file changed +9
-15
lines changed
compiler/rustc_trait_selection/src/traits/error_reporting
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>(
4769
4769
} else {
4770
4770
String :: new ( )
4771
4771
} ;
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
+ )
4787
4781
}
4788
4782
}
4789
4783
You can’t perform that action at this time.
0 commit comments