File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ macro_rules! step_unsigned_methods {
212
212
unsafe { start. unchecked_add( n as Self ) }
213
213
}
214
214
215
- #[ requires( start >= n ) ]
215
+ #[ requires( start >= ( n as Self ) ) ]
216
216
#[ inline]
217
217
unsafe fn backward_unchecked( start: Self , n: usize ) -> Self {
218
218
// SAFETY: the caller has to guarantee that `start - n` doesn't overflow.
@@ -506,7 +506,7 @@ impl Step for char {
506
506
#[ requires( {
507
507
let dist = ( start as u32 ) . checked_add( count as u32 ) ;
508
508
dist. is_some( ) &&
509
- ( start >= 0xD800 || dist. unwrap( ) < 0xD800 ||
509
+ ( ( start as u32 ) >= 0xD800 || dist. unwrap( ) < 0xD800 ||
510
510
dist. unwrap( ) . checked_add( 0x800 ) . is_some( ) )
511
511
} ) ]
512
512
#[ inline]
@@ -528,7 +528,7 @@ impl Step for char {
528
528
#[ requires( {
529
529
let dist = ( start as u32 ) . checked_sub( count as u32 ) ;
530
530
dist. is_some( ) &&
531
- ( start < 0xE000 || dist. unwrap( ) >= 0xE000 ||
531
+ ( ( start as u32 ) < 0xE000 || dist. unwrap( ) >= 0xE000 ||
532
532
dist. unwrap( ) . checked_sub( 0x800 ) . is_some( ) )
533
533
} ) ]
534
534
#[ inline]
You can’t perform that action at this time.
0 commit comments