]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-hr.stderr
Rollup merge of #73794 - GuillaumeGomez:cleanup-e0705, r=Dylan-DPC
[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:87:5
3    |
4 LL | fn foo<T>()
5    |    --- required by a bound in this
6 LL | where
7 LL |     T: for<'x> TheTrait<&'x isize, A = &'x isize>,
8    |                                    ------------- required by this bound in `foo`
9 ...
10 LL |     foo::<UintStruct>();
11    |     ^^^^^^^^^^^^^^^^^ expected `isize`, found `usize`
12    |
13    = note: expected reference `&isize`
14               found reference `&usize`
15
16 error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
17   --> $DIR/associated-types-eq-hr.rs:91:5
18    |
19 LL | fn bar<T>()
20    |    --- required by a bound in this
21 LL | where
22 LL |     T: for<'x> TheTrait<&'x isize, A = &'x usize>,
23    |                                    ------------- required by this bound in `bar`
24 ...
25 LL |     bar::<IntStruct>();
26    |     ^^^^^^^^^^^^^^^^ expected `usize`, found `isize`
27    |
28    = note: expected reference `&usize`
29               found reference `&isize`
30
31 error: implementation of `TheTrait` is not general enough
32   --> $DIR/associated-types-eq-hr.rs:96:5
33    |
34 LL | / pub trait TheTrait<T> {
35 LL | |     type A;
36 LL | |
37 LL | |     fn get(&self, t: T) -> Self::A;
38 LL | | }
39    | |_- trait `TheTrait` defined here
40 ...
41 LL |       tuple_one::<Tuple>();
42    |       ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
43    |
44    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
45    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
46
47 error: implementation of `TheTrait` is not general enough
48   --> $DIR/associated-types-eq-hr.rs:96:5
49    |
50 LL | / pub trait TheTrait<T> {
51 LL | |     type A;
52 LL | |
53 LL | |     fn get(&self, t: T) -> Self::A;
54 LL | | }
55    | |_- trait `TheTrait` defined here
56 ...
57 LL |       tuple_one::<Tuple>();
58    |       ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
59    |
60    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
61    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
62
63 error: implementation of `TheTrait` is not general enough
64   --> $DIR/associated-types-eq-hr.rs:102:5
65    |
66 LL | / pub trait TheTrait<T> {
67 LL | |     type A;
68 LL | |
69 LL | |     fn get(&self, t: T) -> Self::A;
70 LL | | }
71    | |_- trait `TheTrait` defined here
72 ...
73 LL |       tuple_two::<Tuple>();
74    |       ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
75    |
76    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
77    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
78
79 error: implementation of `TheTrait` is not general enough
80   --> $DIR/associated-types-eq-hr.rs:102:5
81    |
82 LL | / pub trait TheTrait<T> {
83 LL | |     type A;
84 LL | |
85 LL | |     fn get(&self, t: T) -> Self::A;
86 LL | | }
87    | |_- trait `TheTrait` defined here
88 ...
89 LL |       tuple_two::<Tuple>();
90    |       ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
91    |
92    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
93    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
94
95 error: implementation of `TheTrait` is not general enough
96   --> $DIR/associated-types-eq-hr.rs:112:5
97    |
98 LL | / pub trait TheTrait<T> {
99 LL | |     type A;
100 LL | |
101 LL | |     fn get(&self, t: T) -> Self::A;
102 LL | | }
103    | |_- trait `TheTrait` defined here
104 ...
105 LL |       tuple_four::<Tuple>();
106    |       ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
107    |
108    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
109    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
110
111 error: aborting due to 7 previous errors
112
113 For more information about this error, try `rustc --explain E0271`.