Skip to content

Commit 44ab559

Browse files
author
Fedor Ryabinin
committed
Fix imports
1 parent 743e5e4 commit 44ab559

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

library/core/src/hint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
//!
55
//! Hints may be compile time or runtime.
66
7-
use safety::requires;
87
#[cfg(kani)]
98
use crate::kani;
10-
119
use crate::mem::MaybeUninit;
1210
use crate::{intrinsics, ub_checks};
1311

12+
use safety::requires;
13+
1414
/// Informs the compiler that the site which is calling this function is not
1515
/// reachable, possibly enabling further optimizations.
1616
///

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use safety::requires;
2-
#[cfg(kani)]
3-
use crate::kani;
4-
51
use crate::intrinsics;
62
use crate::iter::{TrustedLen, TrustedRandomAccess, from_fn};
3+
#[cfg(kani)]
4+
use crate::kani;
75
use crate::num::NonZero;
86
use crate::ops::{Range, Try};
97

8+
use safety::requires;
9+
1010
/// An iterator for stepping iterators by a custom amount.
1111
///
1212
/// This `struct` is created by the [`step_by`] method on [`Iterator`]. See

library/core/src/ops/index_range.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use safety::requires;
1+
use crate::iter::{FusedIterator, TrustedLen};
22
#[cfg(kani)]
33
use crate::kani;
4-
5-
use crate::iter::{FusedIterator, TrustedLen};
64
use crate::num::NonZero;
75
use crate::ops::{NeverShortCircuit, Try};
86
use crate::ub_checks;
97

8+
use safety::requires;
9+
1010
/// Like a `Range<usize>`, but with a safety invariant that `start <= end`.
1111
///
1212
/// This means that `end - start` cannot overflow, allowing some μoptimizations.

library/std/src/sync/mpmc/context.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! Thread-local channel context.
22
33
#[cfg(kani)]
4-
#[unstable(feature="kani", issue="none")]
4+
#[unstable(feature = "kani", issue="none")]
55
use core::kani;
6-
use safety::requires;
76

87
use super::select::Selected;
98
use super::waker::current_thread_id;
@@ -14,6 +13,8 @@ use crate::sync::atomic::{Atomic, AtomicPtr, AtomicUsize, Ordering};
1413
use crate::thread::{self, Thread};
1514
use crate::time::Instant;
1615

16+
use safety::requires;
17+
1718
/// Thread-local context.
1819
#[derive(Debug, Clone)]
1920
pub struct Context {

0 commit comments

Comments
 (0)