File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ impl Layout {
341
341
/// On arithmetic overflow, returns `LayoutError`.
342
342
#[ unstable( feature = "alloc_layout_extra" , issue = "55724" ) ]
343
343
#[ inline]
344
- #[ ensures( |result| result. is_err( ) || n == 0 || result. as_ref( ) . unwrap( ) . 1 % n == 0 ) ]
344
+ #[ ensures( |result| result. is_err( ) || n == 0 || result. as_ref( ) . unwrap( ) . 0 . size ( ) % n == 0 ) ]
345
345
#[ ensures( |result| result. is_err( ) || n == 0 || result. as_ref( ) . unwrap( ) . 0 . size( ) >= self . size( ) ) ]
346
346
// the below multiplication might be too costly to prove at this time
347
347
// #[ensures(|result| result.is_err() || result.as_ref().unwrap().0.size() == n * result.as_ref().unwrap().1)]
@@ -572,6 +572,7 @@ mod verify {
572
572
pub fn check_align ( ) {
573
573
let s = kani:: any :: < usize > ( ) ;
574
574
let a = kani:: any :: < usize > ( ) ;
575
+ kani:: assume ( Layout :: from_size_align ( s, a) . is_ok ( ) ) ;
575
576
unsafe {
576
577
let layout = Layout :: from_size_align_unchecked ( s, a) ;
577
578
let _ = layout. align ( ) ;
You can’t perform that action at this time.
0 commit comments