File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ impl Step for AsciiChar {
570570 Some ( unsafe { AsciiChar :: from_u8_unchecked ( end) } )
571571 }
572572
573- #[ requires( ( start. to_u8( ) as u32 ) . checked_add( count as u32 ) . is_some( ) ) ]
573+ #[ requires( count < 256 && start. to_u8( ) . checked_add( count as u8 ) . is_some( ) ) ]
574574 #[ inline]
575575 unsafe fn forward_unchecked ( start : AsciiChar , count : usize ) -> AsciiChar {
576576 // SAFETY: Caller asserts that result is a valid ASCII character,
@@ -581,7 +581,7 @@ impl Step for AsciiChar {
581581 unsafe { AsciiChar :: from_u8_unchecked ( end) }
582582 }
583583
584- #[ requires( ( start. to_u8( ) as u32 ) . checked_sub( count as u32 ) . is_some( ) ) ]
584+ #[ requires( count < 256 && start. to_u8( ) . checked_sub( count as u8 ) . is_some( ) ) ]
585585 #[ inline]
586586 unsafe fn backward_unchecked ( start : AsciiChar , count : usize ) -> AsciiChar {
587587 // SAFETY: Caller asserts that result is a valid ASCII character,
You can’t perform that action at this time.
0 commit comments