File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/rustc_trait_selection/src/traits/error_reporting Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -910,7 +910,10 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
910910 steps -= 1 ;
911911 }
912912 if steps == 0 {
913- msg = msg. trim_end_matches ( " and dereferencing instead" ) ;
913+ return (
914+ msg. trim_end_matches ( " and dereferencing instead" ) ,
915+ vec ! [ ( prefix_span, String :: new( ) ) ] ,
916+ ) ;
914917 }
915918 let derefs = "*" . repeat ( steps) ;
916919 let needs_parens = steps > 0
@@ -933,7 +936,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
933936 format!( "{derefs}" ) ,
934937 ) ]
935938 } ;
936- suggestion. push ( ( prefix_span, "" . to_string ( ) ) ) ;
939+ suggestion. push ( ( prefix_span, String :: new ( ) ) ) ;
937940 ( msg, suggestion)
938941 } ;
939942
You can’t perform that action at this time.
0 commit comments