Rollup merge of #85374 - the8472:hide-internal-traits, r=SimonSapin

mark internal inplace_iteration traits as hidden

resolves #85373

r? ``@SimonSapin``
This commit is contained in:
Ralf Jung 2021-05-17 18:52:10 +02:00 committed by GitHub
commit fbb0d70c2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 0 deletions

View file

@ -1299,6 +1299,7 @@ impl<T> ExactSizeIterator for IntoIter<T> {
impl<T> FusedIterator for IntoIter<T> {}
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
unsafe impl<T> SourceIter for IntoIter<T> {
type Source = IntoIter<T>;
@ -1309,6 +1310,7 @@ unsafe impl<T> SourceIter for IntoIter<T> {
}
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
unsafe impl<I> InPlaceIterable for IntoIter<I> {}
impl<I> AsIntoIter for IntoIter<I> {

View file

@ -264,9 +264,11 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for IntoIter<T, A> {
}
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
unsafe impl<T, A: Allocator> InPlaceIterable for IntoIter<T, A> {}
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
unsafe impl<T, A: Allocator> SourceIter for IntoIter<T, A> {
type Source = Self;

View file

@ -88,6 +88,7 @@ pub use self::zip::zip;
/// [`FromIterator`]: crate::iter::FromIterator
/// [`as_inner`]: SourceIter::as_inner
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
pub unsafe trait SourceIter {
/// A source stage in an iterator pipeline.
type Source: Iterator;

View file

@ -53,4 +53,5 @@ unsafe impl<I: TrustedLen + ?Sized> TrustedLen for &mut I {}
/// [`next()`]: Iterator::next
/// [`try_fold()`]: Iterator::try_fold
#[unstable(issue = "none", feature = "inplace_iteration")]
#[doc(hidden)]
pub unsafe trait InPlaceIterable: Iterator {}