]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-eq-hr.stderr
feat(rustdoc): open sidebar menu when links inside it are focused
[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 |     tuple_one::<Tuple>();
35    |     ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
36    |
37    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
38    = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
39
40 error: implementation of `TheTrait` is not general enough
41   --> $DIR/associated-types-eq-hr.rs:96:5
42    |
43 LL |     tuple_one::<Tuple>();
44    |     ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
45    |
46    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
47    = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
48
49 error: implementation of `TheTrait` is not general enough
50   --> $DIR/associated-types-eq-hr.rs:102:5
51    |
52 LL |     tuple_two::<Tuple>();
53    |     ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
54    |
55    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
56    = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
57
58 error: implementation of `TheTrait` is not general enough
59   --> $DIR/associated-types-eq-hr.rs:102:5
60    |
61 LL |     tuple_two::<Tuple>();
62    |     ^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
63    |
64    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
65    = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
66
67 error: implementation of `TheTrait` is not general enough
68   --> $DIR/associated-types-eq-hr.rs:112:5
69    |
70 LL |     tuple_four::<Tuple>();
71    |     ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough
72    |
73    = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`...
74    = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2`
75
76 error: aborting due to 7 previous errors
77
78 For more information about this error, try `rustc --explain E0271`.