diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 94cc933d844f3..4c9e8f47d0eb2 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -2874,10 +2874,10 @@ pub mod order {
use super::Iterator;
/// Compare `a` and `b` for equality using `Eq`
- pub fn equals(mut a: T, mut b: S) -> bool where
+ pub fn equals(mut a: L, mut b: R) -> bool where
A: Eq,
- T: Iterator- ,
- S: Iterator
- ,
+ L: Iterator
- ,
+ R: Iterator
- ,
{
loop {
match (a.next(), b.next()) {
@@ -2889,10 +2889,10 @@ pub mod order {
}
/// Order `a` and `b` lexicographically using `Ord`
- pub fn cmp(mut a: T, mut b: S) -> cmp::Ordering where
+ pub fn cmp(mut a: L, mut b: R) -> cmp::Ordering where
A: Ord,
- T: Iterator
- ,
- S: Iterator
- ,
+ L: Iterator
- ,
+ R: Iterator
- ,
{
loop {
match (a.next(), b.next()) {
@@ -2908,10 +2908,8 @@ pub mod order {
}
/// Order `a` and `b` lexicographically using `PartialOrd`
- pub fn partial_cmp(mut a: T, mut b: S) -> Option where
- A: PartialOrd,
- T: Iterator
- ,
- S: Iterator
- ,
+ pub fn partial_cmp(mut a: L, mut b: R) -> Option where
+ L::Item: PartialOrd
{
loop {
match (a.next(), b.next()) {
@@ -2927,10 +2925,8 @@ pub mod order {
}
/// Compare `a` and `b` for equality (Using partial equality, `PartialEq`)
- pub fn eq(mut a: L, mut b: R) -> bool where
- A: PartialEq,
- L: Iterator
- ,
- R: Iterator
- ,
+ pub fn eq(mut a: L, mut b: R) -> bool where
+ L::Item: PartialEq,
{
loop {
match (a.next(), b.next()) {
@@ -2942,10 +2938,8 @@ pub mod order {
}
/// Compare `a` and `b` for nonequality (Using partial equality, `PartialEq`)
- pub fn ne(mut a: L, mut b: R) -> bool where
- A: PartialEq,
- L: Iterator
- ,
- R: Iterator
- ,
+ pub fn ne(mut a: L, mut b: R) -> bool where
+ L::Item: PartialEq,
{
loop {
match (a.next(), b.next()) {
@@ -2957,10 +2951,8 @@ pub mod order {
}
/// Return `a` < `b` lexicographically (Using partial order, `PartialOrd`)
- pub fn lt(mut a: T, mut b: S) -> bool where
- A: PartialOrd,
- T: Iterator
- ,
- S: Iterator
- ,
+ pub fn lt(mut a: L, mut b: R) -> bool where
+ L::Item: PartialOrd,
{
loop {
match (a.next(), b.next()) {
@@ -2973,10 +2965,8 @@ pub mod order {
}
/// Return `a` <= `b` lexicographically (Using partial order, `PartialOrd`)
- pub fn le(mut a: T, mut b: S) -> bool where
- A: PartialOrd,
- T: Iterator
- ,
- S: Iterator
- ,
+ pub fn le(mut a: L, mut b: R) -> bool where
+ L::Item: PartialOrd,
{
loop {
match (a.next(), b.next()) {
@@ -2989,10 +2979,8 @@ pub mod order {
}
/// Return `a` > `b` lexicographically (Using partial order, `PartialOrd`)
- pub fn gt(mut a: T, mut b: S) -> bool where
- A: PartialOrd,
- T: Iterator
- ,
- S: Iterator
- ,
+ pub fn gt(mut a: L, mut b: R) -> bool where
+ L::Item: PartialOrd,
{
loop {
match (a.next(), b.next()) {
@@ -3005,10 +2993,8 @@ pub mod order {
}
/// Return `a` >= `b` lexicographically (Using partial order, `PartialOrd`)
- pub fn ge(mut a: T, mut b: S) -> bool where
- A: PartialOrd,
- T: Iterator
- ,
- S: Iterator
- ,
+ pub fn ge(mut a: L, mut b: R) -> bool where
+ L::Item: PartialOrd,
{
loop {
match (a.next(), b.next()) {