diff --git a/library/core/src/alloc/layout.rs b/library/core/src/alloc/layout.rs index 9b4a040ecd40f..4037ea1935832 100644 --- a/library/core/src/alloc/layout.rs +++ b/library/core/src/alloc/layout.rs @@ -4,10 +4,14 @@ // collections, resulting in having to optimize down excess IR multiple times. // Your performance intuition is useless. Run perf. +use safety::requires; use crate::error::Error; use crate::ptr::{Alignment, NonNull}; use crate::{cmp, fmt, mem}; +#[cfg(kani)] +use crate::kani; + // While this function is used in one place and its implementation // could be inlined, the previous attempts to do so made rustc // slower: diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs index a6094afa13c09..cbda18b5ac2eb 100644 --- a/library/core/src/char/methods.rs +++ b/library/core/src/char/methods.rs @@ -6,6 +6,9 @@ use crate::str::from_utf8_unchecked_mut; use crate::unicode::printable::is_printable; use crate::unicode::{self, conversions}; +#[cfg(kani)] +use crate::kani; + impl char { /// The lowest valid code point a `char` can have, `'\0'`. /// diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 74339cbd4963a..aa79c17763874 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -63,9 +63,13 @@ )] #![allow(missing_docs)] +use safety::requires; use crate::marker::{DiscriminantKind, Tuple}; use crate::{ptr, ub_checks}; +#[cfg(kani)] +use crate::kani; + pub mod mir; pub mod simd; diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs index 5a3d8c8a2a9c3..3c36545b8d421 100644 --- a/library/core/src/mem/mod.rs +++ b/library/core/src/mem/mod.rs @@ -8,6 +8,9 @@ use crate::marker::DiscriminantKind; use crate::{clone, cmp, fmt, hash, intrinsics, ptr}; +#[cfg(kani)] +use crate::kani; + mod manually_drop; #[stable(feature = "manually_drop", since = "1.20.0")] pub use manually_drop::ManuallyDrop; diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index c7ceba782c618..7fb8eae521fbf 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -413,6 +413,9 @@ use crate::marker::FnPtr; use crate::mem::{self, MaybeUninit}; use crate::{fmt, hash, intrinsics, ub_checks}; +#[cfg(kani)] +use crate::kani; + mod alignment; #[unstable(feature = "ptr_alignment_type", issue = "102070")] pub use alignment::Alignment;