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 @@ -52,8 +52,6 @@ pub use core::slice::{from_mut_ptr_range, from_ptr_range};
52
52
pub use core:: slice:: { from_raw_parts, from_raw_parts_mut} ;
53
53
#[ unstable( feature = "slice_range" , issue = "76393" ) ]
54
54
pub use core:: slice:: { range, try_range} ;
55
- #[ cfg( kani) ]
56
- use crate :: kani;
57
55
58
56
////////////////////////////////////////////////////////////////////////////////
59
57
// Basic slice extension methods
@@ -64,6 +62,8 @@ use crate::alloc::Global;
64
62
#[ cfg( not( no_global_oom_handling) ) ]
65
63
use crate :: borrow:: ToOwned ;
66
64
use crate :: boxed:: Box ;
65
+ #[ cfg( kani) ]
66
+ use crate :: kani;
67
67
use crate :: vec:: Vec ;
68
68
69
69
impl < T > [ T ] {
@@ -529,7 +529,7 @@ impl<T> [T] {
529
529
#[ cfg( kani) ]
530
530
let buf_ptr = ptr:: slice_from_raw_parts ( buf. as_ptr ( ) , capacity) ;
531
531
#[ cfg( kani) ]
532
- let len_ptr = unsafe { ( & buf as * const Vec < T > as * const usize ) . add ( 2 ) } ;
532
+ let len_ptr = unsafe { ( & buf as * const Vec < T > as * const usize ) . add ( 2 ) } ;
533
533
#[ kani:: loop_invariant(
534
534
kani:: mem:: same_allocation( buf. as_ptr( ) , buf. as_ptr( ) . wrapping_add( capacity) ) &&
535
535
unsafe { * len_ptr <= T :: MAX_SLICE_LEN } &&
You can’t perform that action at this time.
0 commit comments