blob: 05e6ed69812ad97c6bd07a8b609bdd18ac132cb9 [file] [log] [blame]
error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:82:5
|
LL | / fn foo<T>()
LL | | where T : for<'x> TheTrait<&'x isize, A = &'x isize>
LL | | {
LL | | // ok for IntStruct, but not UintStruct
LL | | }
| |_- required by `foo`
...
LL | foo::<UintStruct>();
| ^^^^^^^^^^^^^^^^^ expected usize, found isize
|
= note: expected type `&usize`
found type `&isize`
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
--> $DIR/associated-types-eq-hr.rs:86:5
|
LL | / fn bar<T>()
LL | | where T : for<'x> TheTrait<&'x isize, A = &'x usize>
LL | | {
LL | | // ok for UintStruct, but not IntStruct
LL | | }
| |_- required by `bar`
...
LL | bar::<IntStruct>();
| ^^^^^^^^^^^^^^^^ expected isize, found usize
|
= note: expected type `&isize`
found type `&usize`
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:91:5
|
LL | / fn tuple_one<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
LL | | {
LL | | // not ok for tuple, two lifetimes and we pick first
LL | | }
| |_- required by `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize`
--> $DIR/associated-types-eq-hr.rs:91:5
|
LL | / fn tuple_one<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
LL | | {
LL | | // not ok for tuple, two lifetimes and we pick first
LL | | }
| |_- required by `tuple_one`
...
LL | tuple_one::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:97:5
|
LL | / fn tuple_two<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
LL | | {
LL | | // not ok for tuple, two lifetimes and we pick second
LL | | }
| |_- required by `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize`
--> $DIR/associated-types-eq-hr.rs:97:5
|
LL | / fn tuple_two<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
LL | | {
LL | | // not ok for tuple, two lifetimes and we pick second
LL | | }
| |_- required by `tuple_two`
...
LL | tuple_two::<Tuple>();
| ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
--> $DIR/associated-types-eq-hr.rs:107:5
|
LL | / fn tuple_four<T>()
LL | | where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)>
LL | | {
LL | | // not ok for tuple, two lifetimes, and lifetime matching is invariant
LL | | }
| |_- required by `tuple_four`
...
LL | tuple_four::<Tuple>();
| ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
|
= help: the following implementations were found:
<Tuple as TheTrait<(&'a isize, &'a isize)>>
error: aborting due to 7 previous errors
Some errors have detailed explanations: E0271, E0277.
For more information about an error, try `rustc --explain E0271`.