mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
relax bounds on iterator adapter Default impls
This commit is contained in:
parent
a4bdfe24c5
commit
e44836faf6
@ -283,11 +283,7 @@ where
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<A, B> Default for Chain<A, B>
|
||||
where
|
||||
A: Iterator + Default,
|
||||
B: Iterator + Default,
|
||||
{
|
||||
impl<A: Default, B: Default> Default for Chain<A, B> {
|
||||
/// Creates a `Chain` from the default values for `A` and `B`.
|
||||
///
|
||||
/// ```
|
||||
|
@ -155,11 +155,7 @@ where
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<'a, I, T: 'a> Default for Cloned<I>
|
||||
where
|
||||
I: Default + Iterator<Item = &'a T>,
|
||||
T: Clone,
|
||||
{
|
||||
impl<I: Default> Default for Cloned<I> {
|
||||
/// Creates a `Cloned` iterator from the default value of `I`
|
||||
/// ```
|
||||
/// # use core::slice;
|
||||
|
@ -242,11 +242,7 @@ where
|
||||
}
|
||||
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<'a, I, T: 'a> Default for Copied<I>
|
||||
where
|
||||
I: Default + Iterator<Item = &'a T>,
|
||||
T: Copy,
|
||||
{
|
||||
impl<I: Default> Default for Copied<I> {
|
||||
/// Creates a `Copied` iterator from the default value of `I`
|
||||
/// ```
|
||||
/// # use core::slice;
|
||||
|
@ -266,10 +266,7 @@ where
|
||||
unsafe impl<I: InPlaceIterable> InPlaceIterable for Enumerate<I> {}
|
||||
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<I> Default for Enumerate<I>
|
||||
where
|
||||
I: Iterator + Default,
|
||||
{
|
||||
impl<I: Default> Default for Enumerate<I> {
|
||||
/// Creates an `Enumerate` iterator from the default value of `I`
|
||||
/// ```
|
||||
/// # use core::slice;
|
||||
|
@ -305,8 +305,7 @@ where
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<I> Default for Flatten<I>
|
||||
where
|
||||
I: Iterator + Default,
|
||||
<I as Iterator>::Item: IntoIterator,
|
||||
I: Default + Iterator<Item: IntoIterator>,
|
||||
{
|
||||
/// Creates a `Flatten` iterator from the default value of `I`.
|
||||
///
|
||||
|
@ -137,10 +137,7 @@ impl<I> FusedIterator for Rev<I> where I: FusedIterator + DoubleEndedIterator {}
|
||||
unsafe impl<I> TrustedLen for Rev<I> where I: TrustedLen + DoubleEndedIterator {}
|
||||
|
||||
#[stable(feature = "default_iters", since = "CURRENT_RUSTC_VERSION")]
|
||||
impl<I> Default for Rev<I>
|
||||
where
|
||||
I: Default + Iterator,
|
||||
{
|
||||
impl<I: Default> Default for Rev<I> {
|
||||
/// Creates a `Rev` iterator from the default value of `I`
|
||||
/// ```
|
||||
/// # use core::slice;
|
||||
|
Loading…
Reference in New Issue
Block a user