1 error: equality constraints are not yet supported in `where` clauses
2 --> $DIR/equality-bound.rs:1:51
4 LL | fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
5 | ^^^^^^^^^^^^^ not supported
7 = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
8 help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
10 LL - fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
11 LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 where {
14 error: equality constraints are not yet supported in `where` clauses
15 --> $DIR/equality-bound.rs:5:41
17 LL | fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
18 | ^^^^^^^^^^^^^ not supported
20 = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
21 help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
23 LL - fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
24 LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 where {
27 error: equality constraints are not yet supported in `where` clauses
28 --> $DIR/equality-bound.rs:9:41
30 LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
31 | ^^^^^^^^^^^^^ not supported
33 = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
35 error[E0433]: failed to resolve: use of undeclared type `I`
36 --> $DIR/equality-bound.rs:9:41
38 LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
39 | ^ use of undeclared type `I`
41 error: aborting due to 4 previous errors
43 For more information about this error, try `rustc --explain E0433`.