Skip to content

Commit 9596e5a

Browse files
committed
pacify tidy
1 parent 6ed05fd commit 9596e5a

File tree

8 files changed

+90
-77
lines changed

8 files changed

+90
-77
lines changed

library/alloc/src/collections/binary_heap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ use core::ops::{Deref, DerefMut};
151151
use core::ptr;
152152

153153
use crate::slice;
154-
use crate::vec::{self, Vec, AsIntoIter};
154+
use crate::vec::{self, AsIntoIter, Vec};
155155

156156
use super::SpecExtend;
157157

@@ -1173,7 +1173,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
11731173
#[stable(feature = "fused", since = "1.26.0")]
11741174
impl<T> FusedIterator for IntoIter<T> {}
11751175

1176-
#[unstable(issue = "0", feature = "inplace_iteration")]
1176+
#[unstable(issue = "none", feature = "inplace_iteration")]
11771177
unsafe impl<T> SourceIter for IntoIter<T> {
11781178
type Source = IntoIter<T>;
11791179

@@ -1183,7 +1183,7 @@ unsafe impl<T> SourceIter for IntoIter<T> {
11831183
}
11841184
}
11851185

1186-
#[unstable(issue = "0", feature = "inplace_iteration")]
1186+
#[unstable(issue = "none", feature = "inplace_iteration")]
11871187
unsafe impl<I> InPlaceIterable for IntoIter<I> {}
11881188

11891189
impl<I> AsIntoIter<I> for IntoIter<I> {

library/alloc/src/vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,7 +2941,7 @@ impl<T> FusedIterator for IntoIter<T> {}
29412941
unsafe impl<T> TrustedLen for IntoIter<T> {}
29422942

29432943
#[doc(hidden)]
2944-
#[unstable(issue = "0", feature = "std_internals")]
2944+
#[unstable(issue = "none", feature = "std_internals")]
29452945
// T: Copy as approximation for !Drop since get_unchecked does not advance self.ptr
29462946
// and thus we can't implement drop-handling
29472947
unsafe impl<T> TrustedRandomAccess for IntoIter<T>
@@ -2987,10 +2987,10 @@ unsafe impl<#[may_dangle] T> Drop for IntoIter<T> {
29872987
}
29882988
}
29892989

2990-
#[unstable(issue = "0", feature = "inplace_iteration")]
2990+
#[unstable(issue = "none", feature = "inplace_iteration")]
29912991
unsafe impl<T> InPlaceIterable for IntoIter<T> {}
29922992

2993-
#[unstable(issue = "0", feature = "inplace_iteration")]
2993+
#[unstable(issue = "none", feature = "inplace_iteration")]
29942994
unsafe impl<T> SourceIter for IntoIter<T> {
29952995
type Source = IntoIter<T>;
29962996

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,7 @@ where
520520
}
521521
}
522522

523-
524-
#[unstable(issue = "0", feature = "inplace_iteration")]
523+
#[unstable(issue = "none", feature = "inplace_iteration")]
525524
unsafe impl<S: Iterator, I: FusedIterator> SourceIter for Fuse<I>
526525
where
527526
I: SourceIter<Source = S>,
@@ -539,5 +538,5 @@ unsafe impl<S: Iterator, I: FusedIterator> SourceIter for Fuse<I>
539538
}
540539
}
541540

542-
#[unstable(issue = "0", feature = "inplace_iteration")]
541+
#[unstable(issue = "none", feature = "inplace_iteration")]
543542
unsafe impl<I: InPlaceIterable> InPlaceIterable for Fuse<I> {}

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

Lines changed: 75 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub use self::zip::Zip;
5555
///
5656
/// [`FromIterator`]: crate::iter::FromIterator
5757
/// [`as_inner`]: SourceIter::as_inner
58-
#[unstable(issue = "0", feature = "inplace_iteration")]
58+
#[unstable(issue = "none", feature = "inplace_iteration")]
5959
pub unsafe trait SourceIter {
6060
/// A source stage in an iterator pipeline.
6161
type Source: Iterator;
@@ -1010,7 +1010,7 @@ where
10101010
}
10111011
}
10121012

1013-
#[unstable(issue = "0", feature = "inplace_iteration")]
1013+
#[unstable(issue = "none", feature = "inplace_iteration")]
10141014
unsafe impl<S: Iterator, B, I: Iterator, F> SourceIter for Map<I, F>
10151015
where
10161016
F: FnMut(I::Item) -> B,
@@ -1025,7 +1025,7 @@ where
10251025
}
10261026
}
10271027

1028-
#[unstable(issue = "0", feature = "inplace_iteration")]
1028+
#[unstable(issue = "none", feature = "inplace_iteration")]
10291029
unsafe impl<B, I: InPlaceIterable, F> InPlaceIterable for Map<I, F> where F: FnMut(I::Item) -> B {}
10301030

10311031
/// An iterator that filters the elements of `iter` with `predicate`.
@@ -1159,10 +1159,11 @@ where
11591159
#[stable(feature = "fused", since = "1.26.0")]
11601160
impl<I: FusedIterator, P> FusedIterator for Filter<I, P> where P: FnMut(&I::Item) -> bool {}
11611161

1162-
#[unstable(issue = "0", feature = "inplace_iteration")]
1163-
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for Filter<I, P> where
1162+
#[unstable(issue = "none", feature = "inplace_iteration")]
1163+
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for Filter<I, P>
1164+
where
11641165
P: FnMut(&I::Item) -> bool,
1165-
I: SourceIter<Source = S>
1166+
I: SourceIter<Source = S>,
11661167
{
11671168
type Source = S;
11681169

@@ -1173,9 +1174,8 @@ unsafe impl<S: Iterator, P, I: Iterator> SourceIter for Filter<I, P> where
11731174
}
11741175
}
11751176

1176-
#[unstable(issue = "0", feature = "inplace_iteration")]
1177-
unsafe impl<I: InPlaceIterable, P> InPlaceIterable for Filter<I, P>
1178-
where P: FnMut(&I::Item) -> bool {}
1177+
#[unstable(issue = "none", feature = "inplace_iteration")]
1178+
unsafe impl<I: InPlaceIterable, P> InPlaceIterable for Filter<I, P> where P: FnMut(&I::Item) -> bool {}
11791179

11801180
/// An iterator that uses `f` to both filter and map elements from `iter`.
11811181
///
@@ -1303,10 +1303,11 @@ where
13031303
#[stable(feature = "fused", since = "1.26.0")]
13041304
impl<B, I: FusedIterator, F> FusedIterator for FilterMap<I, F> where F: FnMut(I::Item) -> Option<B> {}
13051305

1306-
#[unstable(issue = "0", feature = "inplace_iteration")]
1307-
unsafe impl<S: Iterator, B, I: Iterator, F> SourceIter for FilterMap<I, F> where
1306+
#[unstable(issue = "none", feature = "inplace_iteration")]
1307+
unsafe impl<S: Iterator, B, I: Iterator, F> SourceIter for FilterMap<I, F>
1308+
where
13081309
F: FnMut(I::Item) -> Option<B>,
1309-
I: SourceIter<Source = S>
1310+
I: SourceIter<Source = S>,
13101311
{
13111312
type Source = S;
13121313

@@ -1317,10 +1318,11 @@ unsafe impl<S: Iterator, B, I: Iterator, F> SourceIter for FilterMap<I, F> where
13171318
}
13181319
}
13191320

1320-
#[unstable(issue = "0", feature = "inplace_iteration")]
1321-
unsafe impl<B, I: InPlaceIterable, F> InPlaceIterable for FilterMap<I, F>
1322-
where F: FnMut(I::Item) -> Option<B> {}
1323-
1321+
#[unstable(issue = "none", feature = "inplace_iteration")]
1322+
unsafe impl<B, I: InPlaceIterable, F> InPlaceIterable for FilterMap<I, F> where
1323+
F: FnMut(I::Item) -> Option<B>
1324+
{
1325+
}
13241326

13251327
/// An iterator that yields the current count and the element during iteration.
13261328
///
@@ -1540,7 +1542,7 @@ impl<I> FusedIterator for Enumerate<I> where I: FusedIterator {}
15401542
#[unstable(feature = "trusted_len", issue = "37572")]
15411543
unsafe impl<I> TrustedLen for Enumerate<I> where I: TrustedLen {}
15421544

1543-
#[unstable(issue = "0", feature = "inplace_iteration")]
1545+
#[unstable(issue = "none", feature = "inplace_iteration")]
15441546
unsafe impl<S: Iterator, I: Iterator> SourceIter for Enumerate<I>
15451547
where
15461548
I: SourceIter<Source = S>,
@@ -1554,7 +1556,7 @@ where
15541556
}
15551557
}
15561558

1557-
#[unstable(issue = "0", feature = "inplace_iteration")]
1559+
#[unstable(issue = "none", feature = "inplace_iteration")]
15581560
unsafe impl<I: InPlaceIterable> InPlaceIterable for Enumerate<I> {}
15591561

15601562
/// An iterator with a `peek()` that returns an optional reference to the next
@@ -1838,7 +1840,7 @@ impl<I: Iterator> Peekable<I> {
18381840
#[unstable(feature = "trusted_len", issue = "37572")]
18391841
unsafe impl<I> TrustedLen for Peekable<I> where I: TrustedLen {}
18401842

1841-
#[unstable(issue = "0", feature = "inplace_iteration")]
1843+
#[unstable(issue = "none", feature = "inplace_iteration")]
18421844
unsafe impl<S: Iterator, I: Iterator> SourceIter for Peekable<I>
18431845
where
18441846
I: SourceIter<Source = S>,
@@ -1852,7 +1854,7 @@ where
18521854
}
18531855
}
18541856

1855-
#[unstable(issue = "0", feature = "inplace_iteration")]
1857+
#[unstable(issue = "none", feature = "inplace_iteration")]
18561858
unsafe impl<I: InPlaceIterable> InPlaceIterable for Peekable<I> {}
18571859

18581860
/// An iterator that rejects elements while `predicate` returns `true`.
@@ -1956,10 +1958,11 @@ where
19561958
{
19571959
}
19581960

1959-
#[unstable(issue = "0", feature = "inplace_iteration")]
1960-
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for SkipWhile<I, P> where
1961+
#[unstable(issue = "none", feature = "inplace_iteration")]
1962+
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for SkipWhile<I, P>
1963+
where
19611964
P: FnMut(&I::Item) -> bool,
1962-
I: SourceIter<Source = S>
1965+
I: SourceIter<Source = S>,
19631966
{
19641967
type Source = S;
19651968

@@ -1970,9 +1973,11 @@ unsafe impl<S: Iterator, P, I: Iterator> SourceIter for SkipWhile<I, P> where
19701973
}
19711974
}
19721975

1973-
#[unstable(issue = "0", feature = "inplace_iteration")]
1974-
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for SkipWhile<I, F>
1975-
where F: FnMut(&I::Item) -> bool {}
1976+
#[unstable(issue = "none", feature = "inplace_iteration")]
1977+
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for SkipWhile<I, F> where
1978+
F: FnMut(&I::Item) -> bool
1979+
{
1980+
}
19761981

19771982
/// An iterator that only accepts elements while `predicate` returns `true`.
19781983
///
@@ -2088,6 +2093,27 @@ where
20882093
{
20892094
}
20902095

2096+
#[unstable(issue = "none", feature = "inplace_iteration")]
2097+
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for TakeWhile<I, P>
2098+
where
2099+
P: FnMut(&I::Item) -> bool,
2100+
I: SourceIter<Source = S>,
2101+
{
2102+
type Source = S;
2103+
2104+
#[inline]
2105+
unsafe fn as_inner(&mut self) -> &mut S {
2106+
// Safety: unsafe function forwarding to unsafe function with the same requirements
2107+
unsafe { SourceIter::as_inner(&mut self.iter) }
2108+
}
2109+
}
2110+
2111+
#[unstable(issue = "none", feature = "inplace_iteration")]
2112+
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for TakeWhile<I, F> where
2113+
F: FnMut(&I::Item) -> bool
2114+
{
2115+
}
2116+
20912117
/// An iterator that only accepts elements while `predicate` returns `Some(_)`.
20922118
///
20932119
/// This `struct` is created by the [`map_while`] method on [`Iterator`]. See its
@@ -2165,25 +2191,6 @@ where
21652191
}
21662192
}
21672193

2168-
#[unstable(issue = "0", feature = "inplace_iteration")]
2169-
unsafe impl<S: Iterator, P, I: Iterator> SourceIter for TakeWhile<I, P> where
2170-
P: FnMut(&I::Item) -> bool,
2171-
I: SourceIter<Source = S>
2172-
{
2173-
type Source = S;
2174-
2175-
#[inline]
2176-
unsafe fn as_inner(&mut self) -> &mut S {
2177-
// Safety: unsafe function forwarding to unsafe function with the same requirements
2178-
unsafe { SourceIter::as_inner(&mut self.iter) }
2179-
}
2180-
}
2181-
2182-
#[unstable(issue = "0", feature = "inplace_iteration")]
2183-
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for TakeWhile<I, F>
2184-
where F: FnMut(&I::Item) -> bool {}
2185-
2186-
21872194
/// An iterator that skips over `n` elements of `iter`.
21882195
///
21892196
/// This `struct` is created by the [`skip`] method on [`Iterator`]. See its
@@ -2367,7 +2374,7 @@ where
23672374
#[stable(feature = "fused", since = "1.26.0")]
23682375
impl<I> FusedIterator for Skip<I> where I: FusedIterator {}
23692376

2370-
#[unstable(issue = "0", feature = "inplace_iteration")]
2377+
#[unstable(issue = "none", feature = "inplace_iteration")]
23712378
unsafe impl<S: Iterator, I: Iterator> SourceIter for Skip<I>
23722379
where
23732380
I: SourceIter<Source = S>,
@@ -2381,7 +2388,7 @@ where
23812388
}
23822389
}
23832390

2384-
#[unstable(issue = "0", feature = "inplace_iteration")]
2391+
#[unstable(issue = "none", feature = "inplace_iteration")]
23852392
unsafe impl<I: InPlaceIterable> InPlaceIterable for Skip<I> {}
23862393

23872394
/// An iterator that only iterates over the first `n` iterations of `iter`.
@@ -2494,8 +2501,11 @@ where
24942501
}
24952502
}
24962503

2497-
#[unstable(issue = "0", feature = "inplace_iteration")]
2498-
unsafe impl<S: Iterator, I: Iterator> SourceIter for Take<I> where I: SourceIter<Source = S> {
2504+
#[unstable(issue = "none", feature = "inplace_iteration")]
2505+
unsafe impl<S: Iterator, I: Iterator> SourceIter for Take<I>
2506+
where
2507+
I: SourceIter<Source = S>,
2508+
{
24992509
type Source = S;
25002510

25012511
#[inline]
@@ -2505,7 +2515,7 @@ unsafe impl<S: Iterator, I: Iterator> SourceIter for Take<I> where I: SourceIter
25052515
}
25062516
}
25072517

2508-
#[unstable(issue = "0", feature = "inplace_iteration")]
2518+
#[unstable(issue = "none", feature = "inplace_iteration")]
25092519
unsafe impl<I: InPlaceIterable> InPlaceIterable for Take<I> {}
25102520

25112521
#[stable(feature = "double_ended_take_iterator", since = "1.38.0")]
@@ -2672,10 +2682,11 @@ where
26722682
}
26732683
}
26742684

2675-
#[unstable(issue = "0", feature = "inplace_iteration")]
2685+
#[unstable(issue = "none", feature = "inplace_iteration")]
26762686
unsafe impl<St, F, B, S: Iterator, I: Iterator> SourceIter for Scan<I, St, F>
2677-
where I: SourceIter<Source = S>,
2678-
F: FnMut(&mut St, I::Item) -> Option<B>,
2687+
where
2688+
I: SourceIter<Source = S>,
2689+
F: FnMut(&mut St, I::Item) -> Option<B>,
26792690
{
26802691
type Source = S;
26812692

@@ -2686,10 +2697,11 @@ unsafe impl<St, F, B, S: Iterator, I: Iterator> SourceIter for Scan<I, St, F>
26862697
}
26872698
}
26882699

2689-
#[unstable(issue = "0", feature = "inplace_iteration")]
2690-
unsafe impl<St, F, B, I: InPlaceIterable> InPlaceIterable for Scan<I, St, F>
2691-
where F: FnMut(&mut St, I::Item) -> Option<B>,
2692-
{}
2700+
#[unstable(issue = "none", feature = "inplace_iteration")]
2701+
unsafe impl<St, F, B, I: InPlaceIterable> InPlaceIterable for Scan<I, St, F> where
2702+
F: FnMut(&mut St, I::Item) -> Option<B>
2703+
{
2704+
}
26932705

26942706
/// An iterator that calls a function with a reference to each element before
26952707
/// yielding it.
@@ -2837,10 +2849,11 @@ where
28372849
#[stable(feature = "fused", since = "1.26.0")]
28382850
impl<I: FusedIterator, F> FusedIterator for Inspect<I, F> where F: FnMut(&I::Item) {}
28392851

2840-
#[unstable(issue = "0", feature = "inplace_iteration")]
2841-
unsafe impl<S: Iterator, I: Iterator, F> SourceIter for Inspect<I, F> where
2852+
#[unstable(issue = "none", feature = "inplace_iteration")]
2853+
unsafe impl<S: Iterator, I: Iterator, F> SourceIter for Inspect<I, F>
2854+
where
28422855
F: FnMut(&I::Item),
2843-
I: SourceIter<Source = S>
2856+
I: SourceIter<Source = S>,
28442857
{
28452858
type Source = S;
28462859

@@ -2851,8 +2864,8 @@ unsafe impl<S: Iterator, I: Iterator, F> SourceIter for Inspect<I, F> where
28512864
}
28522865
}
28532866

2854-
#[unstable(issue = "0", feature = "inplace_iteration")]
2855-
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for Inspect<I, F> where F: FnMut(&I::Item) {}
2867+
#[unstable(issue = "none", feature = "inplace_iteration")]
2868+
unsafe impl<I: InPlaceIterable, F> InPlaceIterable for Inspect<I, F> where F: FnMut(&I::Item) {}
28562869

28572870
/// An iterator adapter that produces output as long as the underlying
28582871
/// iterator produces `Result::Ok` values.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ where
332332

333333
// Arbitrarily selects the left side of the zip iteration as extractable "source"
334334
// it would require negative trait bounds to be able to try both
335-
#[unstable(issue = "0", feature = "inplace_iteration")]
335+
#[unstable(issue = "none", feature = "inplace_iteration")]
336336
unsafe impl<S, A, B> SourceIter for Zip<A, B>
337337
where
338338
A: SourceIter<Source = S>,
@@ -348,7 +348,7 @@ unsafe impl<S, A, B> SourceIter for Zip<A, B>
348348
}
349349
}
350350

351-
#[unstable(issue = "0", feature = "inplace_iteration")]
351+
#[unstable(issue = "none", feature = "inplace_iteration")]
352352
// Limited to Item: Copy since interaction between Zip's use of TrustedRandomAccess
353353
// and Drop implementation of the source is unclear.
354354
//

0 commit comments

Comments
 (0)