Skip to content

Commit 9cec589

Browse files
committed
put kani imports back
1 parent f5d8b9d commit 9cec589

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

library/core/src/alloc/layout.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
// collections, resulting in having to optimize down excess IR multiple times.
55
// Your performance intuition is useless. Run perf.
66

7+
use safety::requires;
78
use crate::error::Error;
89
use crate::ptr::{Alignment, NonNull};
910
use crate::{cmp, fmt, mem};
1011

12+
#[cfg(kani)]
13+
use crate::kani;
14+
1115
// While this function is used in one place and its implementation
1216
// could be inlined, the previous attempts to do so made rustc
1317
// slower:

library/core/src/char/methods.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ use crate::str::from_utf8_unchecked_mut;
66
use crate::unicode::printable::is_printable;
77
use crate::unicode::{self, conversions};
88

9+
#[cfg(kani)]
10+
use crate::kani;
11+
912
impl char {
1013
/// The lowest valid code point a `char` can have, `'\0'`.
1114
///

library/core/src/intrinsics.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@
6363
)]
6464
#![allow(missing_docs)]
6565

66+
use safety::requires;
6667
use crate::marker::{DiscriminantKind, Tuple};
6768
use crate::{ptr, ub_checks};
6869

70+
#[cfg(kani)]
71+
use crate::kani;
72+
6973
pub mod mir;
7074
pub mod simd;
7175

library/core/src/mem/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use crate::marker::DiscriminantKind;
99
use crate::{clone, cmp, fmt, hash, intrinsics, ptr};
1010

11+
#[cfg(kani)]
12+
use crate::kani;
13+
1114
mod manually_drop;
1215
#[stable(feature = "manually_drop", since = "1.20.0")]
1316
pub use manually_drop::ManuallyDrop;

library/core/src/ptr/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,9 @@ use crate::marker::FnPtr;
413413
use crate::mem::{self, MaybeUninit};
414414
use crate::{fmt, hash, intrinsics, ub_checks};
415415

416+
#[cfg(kani)]
417+
use crate::kani;
418+
416419
mod alignment;
417420
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
418421
pub use alignment::Alignment;

0 commit comments

Comments
 (0)