]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-hr.stderr
remove snapshot calls from "match" operations during select
[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[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'x isize`
32   --> $DIR/associated-types-eq-hr.rs:96:5
33    |
34 LL | fn tuple_one<T>()
35    |    --------- required by a bound in this
36 LL | where
37 LL |     T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'x isize>,
38    |                                                     ------------- required by this bound in `tuple_one`
39 ...
40 LL |     tuple_one::<Tuple>();
41    |     ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
42
43 error[E0271]: type mismatch resolving `for<'x, 'y> <Tuple as TheTrait<(&'x isize, &'y isize)>>::A == &'y isize`
44   --> $DIR/associated-types-eq-hr.rs:101:5
45    |
46 LL | fn tuple_two<T>()
47    |    --------- required by a bound in this
48 LL | where
49 LL |     T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>,
50    |                                                     ------------- required by this bound in `tuple_two`
51 ...
52 LL |     tuple_two::<Tuple>();
53    |     ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'y, found concrete lifetime
54
55 error: implementation of `TheTrait` is not general enough
56   --> $DIR/associated-types-eq-hr.rs:110:5
57    |
58 LL | / pub trait TheTrait<T> {
59 LL | |     type A;
60 LL | |
61 LL | |     fn get(&self, t: T) -> Self::A;
62 LL | | }
63    | |_- trait `TheTrait` defined here
64 ...
65 LL |       tuple_four::<Tuple>();
66    |       ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
67    |
68    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
69    = note: ...but `Tuple` actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
70
71 error: aborting due to 5 previous errors
72
73 For more information about this error, try `rustc --explain E0271`.