@@ -1086,7 +1086,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
1086
1086
for param in params {
1087
1087
if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( param. span )
1088
1088
{
1089
- if snippet. starts_with ( "&" ) && !snippet. starts_with ( "&'" ) {
1089
+ if snippet. starts_with ( '&' ) && !snippet. starts_with ( "&'" ) {
1090
1090
introduce_suggestion
1091
1091
. push ( ( param. span , format ! ( "&'a {}" , & snippet[ 1 ..] ) ) ) ;
1092
1092
} else if snippet. starts_with ( "&'_ " ) {
@@ -1118,7 +1118,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
1118
1118
( 1 , Some ( name) , Some ( "'_" ) ) => {
1119
1119
suggest_existing ( err, name. to_string ( ) ) ;
1120
1120
}
1121
- ( 1 , Some ( name) , Some ( snippet) ) if !snippet. ends_with ( ">" ) => {
1121
+ ( 1 , Some ( name) , Some ( snippet) ) if !snippet. ends_with ( '>' ) => {
1122
1122
suggest_existing ( err, format ! ( "{}<{}>" , snippet, name) ) ;
1123
1123
}
1124
1124
( 0 , _, Some ( "&" ) ) => {
@@ -1127,7 +1127,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
1127
1127
( 0 , _, Some ( "'_" ) ) => {
1128
1128
suggest_new ( err, "'a" ) ;
1129
1129
}
1130
- ( 0 , _, Some ( snippet) ) if !snippet. ends_with ( ">" ) => {
1130
+ ( 0 , _, Some ( snippet) ) if !snippet. ends_with ( '>' ) => {
1131
1131
suggest_new ( err, & format ! ( "{}<'a>" , snippet) ) ;
1132
1132
}
1133
1133
_ => {
0 commit comments