@@ -1086,7 +1086,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
10861086 for param in params {
10871087 if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( param. span )
10881088 {
1089- if snippet. starts_with ( "&" ) && !snippet. starts_with ( "&'" ) {
1089+ if snippet. starts_with ( '&' ) && !snippet. starts_with ( "&'" ) {
10901090 introduce_suggestion
10911091 . push ( ( param. span , format ! ( "&'a {}" , & snippet[ 1 ..] ) ) ) ;
10921092 } else if snippet. starts_with ( "&'_ " ) {
@@ -1118,7 +1118,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
11181118 ( 1 , Some ( name) , Some ( "'_" ) ) => {
11191119 suggest_existing ( err, name. to_string ( ) ) ;
11201120 }
1121- ( 1 , Some ( name) , Some ( snippet) ) if !snippet. ends_with ( ">" ) => {
1121+ ( 1 , Some ( name) , Some ( snippet) ) if !snippet. ends_with ( '>' ) => {
11221122 suggest_existing ( err, format ! ( "{}<{}>" , snippet, name) ) ;
11231123 }
11241124 ( 0 , _, Some ( "&" ) ) => {
@@ -1127,7 +1127,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
11271127 ( 0 , _, Some ( "'_" ) ) => {
11281128 suggest_new ( err, "'a" ) ;
11291129 }
1130- ( 0 , _, Some ( snippet) ) if !snippet. ends_with ( ">" ) => {
1130+ ( 0 , _, Some ( snippet) ) if !snippet. ends_with ( '>' ) => {
11311131 suggest_new ( err, & format ! ( "{}<'a>" , snippet) ) ;
11321132 }
11331133 _ => {
0 commit comments