File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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 {
212212 unsafe { start. unchecked_add( n as Self ) }
213213 }
214214
215- #[ requires( start >= n ) ]
215+ #[ requires( start >= ( n as Self ) ) ]
216216 #[ inline]
217217 unsafe fn backward_unchecked( start: Self , n: usize ) -> Self {
218218 // SAFETY: the caller has to guarantee that `start - n` doesn't overflow.
@@ -506,7 +506,7 @@ impl Step for char {
506506 #[ requires( {
507507 let dist = ( start as u32 ) . checked_add( count as u32 ) ;
508508 dist. is_some( ) &&
509- ( start >= 0xD800 || dist. unwrap( ) < 0xD800 ||
509+ ( ( start as u32 ) >= 0xD800 || dist. unwrap( ) < 0xD800 ||
510510 dist. unwrap( ) . checked_add( 0x800 ) . is_some( ) )
511511 } ) ]
512512 #[ inline]
@@ -528,7 +528,7 @@ impl Step for char {
528528 #[ requires( {
529529 let dist = ( start as u32 ) . checked_sub( count as u32 ) ;
530530 dist. is_some( ) &&
531- ( start < 0xE000 || dist. unwrap( ) >= 0xE000 ||
531+ ( ( start as u32 ) < 0xE000 || dist. unwrap( ) >= 0xE000 ||
532532 dist. unwrap( ) . checked_sub( 0x800 ) . is_some( ) )
533533 } ) ]
534534 #[ inline]
You can’t perform that action at this time.
0 commit comments