Skip to content

Commit 1b72505

Browse files
author
Fedor Ryabinin
committed
Fix imports
1 parent 78910a4 commit 1b72505

5 files changed

Lines changed: 15 additions & 25 deletions

File tree

library/core/src/array/ascii.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use safety::{ensures,requires};
2-
#[cfg(kani)]
3-
use crate::kani;
4-
#[allow(unused_imports)]
5-
use crate::ub_checks::*;
1+
use safety::requires;
62

73
use crate::ascii;
4+
#[cfg(kani)]
5+
use crate::kani;
86

97
impl<const N: usize> [u8; N] {
108
/// Converts this array of bytes into an array of ASCII characters,

library/core/src/array/drain.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use safety::{ensures,requires};
2-
#[cfg(kani)]
3-
use crate::kani;
4-
#[allow(unused_imports)]
5-
use crate::ub_checks::*;
1+
use safety::requires;
62

73
use crate::iter::{TrustedLen, UncheckedIterator};
4+
#[cfg(kani)]
5+
use crate::kani;
86
use crate::mem::ManuallyDrop;
97
use crate::ptr::drop_in_place;
108
use crate::slice;

library/core/src/fmt/rt.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@
66
//!
77
//! Do not modify them without understanding the consequences for the format_args!() macro.
88
9-
use crate::ub_checks::Invariant;
10-
11-
use safety::{ensures,requires};
12-
#[cfg(kani)]
13-
use crate::kani;
14-
#[allow(unused_imports)]
15-
use crate::ub_checks::*;
9+
use safety::requires;
1610

1711
use super::*;
1812
use crate::hint::unreachable_unchecked;
13+
#[cfg(kani)]
14+
use crate::kani;
1915
use crate::ptr::NonNull;
16+
use crate::ub_checks::Invariant;
2017

2118
#[lang = "format_placeholder"]
2219
#[derive(Copy, Clone)]

library/core/src/iter/adapters/map_windows.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
use crate::ub_checks::Invariant;
2-
31
use crate::iter::FusedIterator;
42
use crate::mem::MaybeUninit;
53
use crate::{fmt, ptr};
4+
use crate::ub_checks::Invariant;
65

76
/// An iterator over the mapped windows of another iterator.
87
///
@@ -297,4 +296,4 @@ impl<T, const N: usize> Invariant for Buffer<T, N> {
297296
fn is_safe(&self) -> bool {
298297
self.start + N <= 2 * N
299298
}
300-
}
299+
}

library/core/src/iter/traits/unchecked_iterator.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
use safety::{ensures,requires};
2-
#[cfg(kani)]
3-
use crate::kani;
4-
#[allow(unused_imports)]
5-
use crate::ub_checks::*;
1+
use safety::requires;
62

73
use crate::iter::TrustedLen;
4+
#[cfg(kani)]
5+
use crate::kani;
86

97
/// [`TrustedLen`] cannot have methods, so this allows augmenting it.
108
///

0 commit comments

Comments
 (0)