]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-hr.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / associated-types / associated-types-eq-hr.stderr
1 error[E0271]: type mismatch resolving `for<'x> <UintStruct as TheTrait<&'x isize>>::A == &'x isize`
2   --> $DIR/associated-types-eq-hr.rs:92:5
3    |
4 LL |     foo::<UintStruct>(); //~ ERROR type mismatch
5    |     ^^^^^^^^^^^^^^^^^ expected usize, found isize
6    |
7    = note: expected type `&usize`
8               found type `&isize`
9 note: required by `foo`
10   --> $DIR/associated-types-eq-hr.rs:54:1
11    |
12 LL | / fn foo<T>()
13 LL | |     where T : for<'x> TheTrait<&'x isize, A = &'x isize>
14 LL | | {
15 LL | |     // ok for IntStruct, but not UintStruct
16 LL | | }
17    | |_^
18
19 error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
20   --> $DIR/associated-types-eq-hr.rs:94:5
21    |
22 LL |     bar::<IntStruct>(); //~ ERROR type mismatch
23    |     ^^^^^^^^^^^^^^^^ expected isize, found usize
24    |
25    = note: expected type `&isize`
26               found type `&usize`
27 note: required by `bar`
28   --> $DIR/associated-types-eq-hr.rs:60:1
29    |
30 LL | / fn bar<T>()
31 LL | |     where T : for<'x> TheTrait<&'x isize, A = &'x usize>
32 LL | | {
33 LL | |     // ok for UintStruct, but not IntStruct
34 LL | | }
35    | |_^
36
37 error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
38   --> $DIR/associated-types-eq-hr.rs:97:5
39    |
40 LL |     tuple_one::<Tuple>();
41    |     ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
42    |
43    = help: the following implementations were found:
44              <Tuple as TheTrait<(&'a isize, &'a isize)>>
45 note: required by `tuple_one`
46   --> $DIR/associated-types-eq-hr.rs:66:1
47    |
48 LL | / fn tuple_one<T>()
49 LL | |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
50 LL | | {
51 LL | |     // not ok for tuple, two lifetimes and we pick first
52 LL | | }
53    | |_^
54
55 error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize`
56   --> $DIR/associated-types-eq-hr.rs:97:5
57    |
58 LL |     tuple_one::<Tuple>();
59    |     ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
60    |
61 note: required by `tuple_one`
62   --> $DIR/associated-types-eq-hr.rs:66:1
63    |
64 LL | / fn tuple_one<T>()
65 LL | |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>
66 LL | | {
67 LL | |     // not ok for tuple, two lifetimes and we pick first
68 LL | | }
69    | |_^
70
71 error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
72   --> $DIR/associated-types-eq-hr.rs:101:5
73    |
74 LL |     tuple_two::<Tuple>();
75    |     ^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
76    |
77    = help: the following implementations were found:
78              <Tuple as TheTrait<(&'a isize, &'a isize)>>
79 note: required by `tuple_two`
80   --> $DIR/associated-types-eq-hr.rs:72:1
81    |
82 LL | / fn tuple_two<T>()
83 LL | |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
84 LL | | {
85 LL | |     // not ok for tuple, two lifetimes and we pick second
86 LL | | }
87    | |_^
88
89 error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize`
90   --> $DIR/associated-types-eq-hr.rs:101:5
91    |
92 LL |     tuple_two::<Tuple>();
93    |     ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
94    |
95 note: required by `tuple_two`
96   --> $DIR/associated-types-eq-hr.rs:72:1
97    |
98 LL | / fn tuple_two<T>()
99 LL | |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>
100 LL | | {
101 LL | |     // not ok for tuple, two lifetimes and we pick second
102 LL | | }
103    | |_^
104
105 error[E0277]: the trait bound `for<'x, 'y> Tuple: TheTrait<(&'x isize, &'y isize)>` is not satisfied
106   --> $DIR/associated-types-eq-hr.rs:107:5
107    |
108 LL |     tuple_four::<Tuple>();
109    |     ^^^^^^^^^^^^^^^^^^^ the trait `for<'x, 'y> TheTrait<(&'x isize, &'y isize)>` is not implemented for `Tuple`
110    |
111    = help: the following implementations were found:
112              <Tuple as TheTrait<(&'a isize, &'a isize)>>
113 note: required by `tuple_four`
114   --> $DIR/associated-types-eq-hr.rs:84:1
115    |
116 LL | / fn tuple_four<T>()
117 LL | |     where T : for<'x,'y> TheTrait<(&'x isize, &'y isize)>
118 LL | | {
119 LL | |     // not ok for tuple, two lifetimes, and lifetime matching is invariant
120 LL | | }
121    | |_^
122
123 error: aborting due to 7 previous errors
124
125 Some errors occurred: E0271, E0277.
126 For more information about an error, try `rustc --explain E0271`.