@@ -568,7 +568,7 @@ impl Diagnostic {
568
568
) -> & mut Self {
569
569
assert ! ( !suggestion. is_empty( ) ) ;
570
570
debug_assert ! (
571
- !( suggestion. iter( ) . any( |( sp, text) | sp. lo ( ) == sp . hi ( ) && text. is_empty( ) ) ) ,
571
+ !( suggestion. iter( ) . any( |( sp, text) | sp. is_empty ( ) && text. is_empty( ) ) ) ,
572
572
"Span must not be empty and have no suggestion"
573
573
) ;
574
574
@@ -650,7 +650,7 @@ impl Diagnostic {
650
650
style : SuggestionStyle ,
651
651
) -> & mut Self {
652
652
debug_assert ! (
653
- !( sp. lo ( ) == sp . hi ( ) && suggestion. to_string( ) . is_empty( ) ) ,
653
+ !( sp. is_empty ( ) && suggestion. to_string( ) . is_empty( ) ) ,
654
654
"Span must not be empty and have no suggestion"
655
655
) ;
656
656
self . push_suggestion ( CodeSuggestion {
@@ -695,7 +695,7 @@ impl Diagnostic {
695
695
suggestions. sort ( ) ;
696
696
697
697
debug_assert ! (
698
- !( sp. lo ( ) == sp . hi ( ) && suggestions. iter( ) . any( |suggestion| suggestion. is_empty( ) ) ) ,
698
+ !( sp. is_empty ( ) && suggestions. iter( ) . any( |suggestion| suggestion. is_empty( ) ) ) ,
699
699
"Span must not be empty and have no suggestion"
700
700
) ;
701
701
@@ -725,7 +725,7 @@ impl Diagnostic {
725
725
!( suggestions
726
726
. iter( )
727
727
. flat_map( |suggs| suggs)
728
- . any( |( sp, suggestion) | sp. lo ( ) == sp . hi ( ) && suggestion. is_empty( ) ) ) ,
728
+ . any( |( sp, suggestion) | sp. is_empty ( ) && suggestion. is_empty( ) ) ) ,
729
729
"Span must not be empty and have no suggestion"
730
730
) ;
731
731
0 commit comments