]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/equality-bound.stderr
Modify existing bounds if they exist
[rust.git] / tests / ui / generic-associated-types / equality-bound.stderr
1 error: equality constraints are not yet supported in `where` clauses
2   --> $DIR/equality-bound.rs:1:51
3    |
4 LL | fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
5    |                                                   ^^^^^^^^^^^^^ not supported
6    |
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
9    |
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  {
12    |
13
14 error: equality constraints are not yet supported in `where` clauses
15   --> $DIR/equality-bound.rs:5:41
16    |
17 LL | fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
18    |                                         ^^^^^^^^^^^^^ not supported
19    |
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
22    |
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  {
25    |
26
27 error: equality constraints are not yet supported in `where` clauses
28   --> $DIR/equality-bound.rs:9:41
29    |
30 LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
31    |                                         ^^^^^^^^^^^^^ not supported
32    |
33    = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
34
35 error[E0433]: failed to resolve: use of undeclared type `I`
36   --> $DIR/equality-bound.rs:9:41
37    |
38 LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
39    |                                         ^ use of undeclared type `I`
40
41 error: aborting due to 4 previous errors
42
43 For more information about this error, try `rustc --explain E0433`.