File: equality-bound.stderr

package info (click to toggle)
rustc 1.70.0%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 722,120 kB
  • sloc: xml: 147,962; javascript: 10,210; sh: 8,590; python: 8,220; ansic: 5,901; cpp: 4,635; makefile: 4,001; asm: 2,856
file content (43 lines) | stat: -rw-r--r-- 1,903 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
error: equality constraints are not yet supported in `where` clauses
  --> $DIR/equality-bound.rs:1:51
   |
LL | fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
   |                                                   ^^^^^^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
   |
LL - fn sum<I: Iterator<Item = ()>>(i: I) -> i32 where I::Item = i32 {
LL + fn sum<I: Iterator<Item = (), Item = i32>>(i: I) -> i32 where  {
   |

error: equality constraints are not yet supported in `where` clauses
  --> $DIR/equality-bound.rs:5:41
   |
LL | fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
   |                                         ^^^^^^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `Iterator::Item` is an associated type you're trying to set, use the associated type binding syntax
   |
LL - fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
LL + fn sum2<I: Iterator<Item = i32>>(i: I) -> i32 where  {
   |

error: equality constraints are not yet supported in `where` clauses
  --> $DIR/equality-bound.rs:9:41
   |
LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
   |                                         ^^^^^^^^^^^^^ not supported
   |
   = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information

error[E0433]: failed to resolve: use of undeclared type `I`
  --> $DIR/equality-bound.rs:9:41
   |
LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
   |                                         ^ use of undeclared type `I`

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0433`.