blob: 265c86ac5bb615fd3d62e3684b9385515c9b5b5b [file] [log] [blame]
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 {
|
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 {
|
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: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:20:58
|
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
| ^^^^^^^^^^^^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
|
error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:31:58
|
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
| ^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
|
error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:42:55
|
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
| ^^^^^^^^^^^^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
LL + fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
|
error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:53:55
|
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
| ^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
LL + fn from_iter<T: IntoIterator<Item = A>>(_: T) -> Self
|
error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:64:41
|
LL | fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
| ^^^^^^^^^^^^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
|
error: equality constraints are not yet supported in `where` clauses
--> $DIR/equality-bound.rs:75:41
|
LL | fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
| ^^^^^^^^^^^ not supported
|
= note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
help: if `IntoIterator::Item` is an associated type you're trying to set, use the associated type binding syntax
|
LL - fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator<Item = A>,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:20:79
|
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
| ^
...
LL | struct K {}
| -------- similarly named struct `K` defined here
|
help: a struct with a similar name exists
|
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = K,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:31:68
|
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
| ^
...
LL | struct K {}
| -------- similarly named struct `K` defined here
|
help: a struct with a similar name exists
|
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = K,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:42:76
|
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
| ^
...
LL | struct K {}
| -------- similarly named struct `K` defined here
|
help: a struct with a similar name exists
|
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
LL + fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = K,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:53:65
|
LL | struct K {}
| -------- similarly named struct `K` defined here
...
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
| ^
|
help: a struct with a similar name exists
|
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
LL + fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = K,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:64:62
|
LL | struct K {}
| -------- similarly named struct `K` defined here
...
LL | fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
| ^
|
help: a struct with a similar name exists
|
LL - fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
LL + fn from_iter<T>(_: T) -> Self where IntoIterator::Item = K, T: IntoIterator,
|
error[E0425]: cannot find type `A` in this scope
--> $DIR/equality-bound.rs:75:51
|
LL | struct K {}
| -------- similarly named struct `K` defined here
...
LL | fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
| ^
|
help: a struct with a similar name exists
|
LL - fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
LL + fn from_iter<T>(_: T) -> Self where T::Item = K, T: IntoIterator,
|
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`
|
help: a type parameter with a similar name exists
|
LL - fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
LL + fn sum3<J: Iterator>(i: J) -> i32 where J::Item = i32 {
|
error: aborting due to 16 previous errors
Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.