Skip to content

Commit

Permalink
put kani imports back
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzech committed Aug 16, 2024
1 parent f5d8b9d commit 9cec589
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/core/src/alloc/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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'`.
///
Expand Down
4 changes: 4 additions & 0 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9cec589

Please sign in to comment.