Skip to content

Commit

Permalink
Rollup merge of #112670 - petrochenkov:typriv, r=eholk
Browse files Browse the repository at this point in the history
privacy: Type privacy lints fixes and cleanups

See individual commits.
Follow up to rust-lang/rust#111801.
  • Loading branch information
matthiaskrgr authored Jun 29, 2023
2 parents 400f736 + 3e5d326 commit a455c94
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/src/iter/adapters/flatten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ where
/// Real logic of both `Flatten` and `FlatMap` which simply delegate to
/// this type.
#[derive(Clone, Debug)]
#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
struct FlattenCompat<I, U> {
iter: Fuse<I>,
frontiter: Option<U>,
Expand Down Expand Up @@ -464,7 +464,7 @@ where
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
impl<I, U> Iterator for FlattenCompat<I, U>
where
I: Iterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
Expand Down Expand Up @@ -579,7 +579,7 @@ where
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
impl<I, U> DoubleEndedIterator for FlattenCompat<I, U>
where
I: DoubleEndedIterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
Expand Down Expand Up @@ -649,23 +649,23 @@ where
}
}

#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
unsafe impl<const N: usize, I, T> TrustedLen
for FlattenCompat<I, <[T; N] as IntoIterator>::IntoIter>
where
I: TrustedLen<Item = [T; N]>,
{
}

#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
unsafe impl<'a, const N: usize, I, T> TrustedLen
for FlattenCompat<I, <&'a [T; N] as IntoIterator>::IntoIter>
where
I: TrustedLen<Item = &'a [T; N]>,
{
}

#[unstable(feature = "trusted_len", issue = "37572")]
#[cfg_attr(bootstrap, unstable(feature = "trusted_len", issue = "37572"))]
unsafe impl<'a, const N: usize, I, T> TrustedLen
for FlattenCompat<I, <&'a mut [T; N] as IntoIterator>::IntoIter>
where
Expand Down

0 comments on commit a455c94

Please sign in to comment.