Skip to content

Commit

Permalink
Syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jul 9, 2024
1 parent 3b8b99a commit 2f1be0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ impl fmt::Display for LayoutError {
mod verify {
use crate::kani;

#[kani::proof_for_contact(from_size_align_unchecked)]
#[kani::proof_for_contract(from_size_align_unchecked)]
pub fn check_from_size_align_unchecked() {
let s = kani::any::<usize>();
let shift_index = kani::any::<u8>();
Expand Down
3 changes: 3 additions & 0 deletions library/core/src/ptr/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ use crate::num::NonZero;
use crate::ub_checks::assert_unsafe_precondition;
use crate::{cmp, fmt, hash, mem, num};

#[cfg(kani)]
use crate::kani;

/// A type storing a `usize` which is a power of two, and thus
/// represents a possible alignment in the Rust abstract machine.
///
Expand Down

0 comments on commit 2f1be0d

Please sign in to comment.