@@ -17,7 +17,7 @@ LL | | }
17
17
| |_^
18
18
19
19
error[E0271]: type mismatch resolving `for<'x> <IntStruct as TheTrait<&'x isize>>::A == &'x usize`
20
- --> $DIR/associated-types-eq-hr.rs:84 :5
20
+ --> $DIR/associated-types-eq-hr.rs:86 :5
21
21
|
22
22
LL | bar::<IntStruct>(); //~ ERROR type mismatch
23
23
| ^^^^^^^^^^^^^^^^ expected isize, found usize
@@ -34,93 +34,67 @@ LL | | // ok for UintStruct, but not IntStruct
34
34
LL | | }
35
35
| |_^
36
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:87 :5
37
+ error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
38
+ --> $DIR/associated-types-eq-hr.rs:91 :5
39
39
|
40
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:56:1
41
+ | ^^^^^^^^^^^^^^^^^^
47
42
|
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
- | |_^
43
+ = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:20), 'x) })...
44
+ = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:21), 'y) })...
45
+ = note: ...so that the types are compatible:
46
+ expected TheTrait<(&'x isize, &'y isize)>
47
+ found TheTrait<(&isize, &isize)>
54
48
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:87 :5
49
+ error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
50
+ --> $DIR/associated-types-eq-hr.rs:91 :5
57
51
|
58
52
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:56:1
53
+ | ^^^^^^^^^^^^^^^^^^
63
54
|
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
- | |_^
55
+ = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:20), 'x) })...
56
+ = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:21), 'y) })...
57
+ = note: ...so that the types are compatible:
58
+ expected TheTrait<(&'x isize, &'y isize)>
59
+ found TheTrait<(&isize, &isize)>
70
60
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:91 :5
61
+ error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
62
+ --> $DIR/associated-types-eq-hr.rs:97 :5
73
63
|
74
64
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:62:1
65
+ | ^^^^^^^^^^^^^^^^^^
81
66
|
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
- | |_^
67
+ = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:23), 'x) })...
68
+ = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:24), 'y) })...
69
+ = note: ...so that the types are compatible:
70
+ expected TheTrait<(&'x isize, &'y isize)>
71
+ found TheTrait<(&isize, &isize)>
88
72
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:91 :5
73
+ error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
74
+ --> $DIR/associated-types-eq-hr.rs:97 :5
91
75
|
92
76
LL | tuple_two::<Tuple>();
93
- | ^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
77
+ | ^^^^^^^^^^^^^^^^^^
94
78
|
95
- note: required by `tuple_two`
96
- --> $DIR/associated-types-eq-hr.rs:62: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
- | |_^
79
+ = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:23), 'x) })...
80
+ = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U2, name: BrNamed(crate0:DefIndex(1:24), 'y) })...
81
+ = note: ...so that the types are compatible:
82
+ expected TheTrait<(&'x isize, &'y isize)>
83
+ found TheTrait<(&isize, &isize)>
104
84
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:97 :5
85
+ error[E0495 ]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
86
+ --> $DIR/associated-types-eq-hr.rs:107 :5
107
87
|
108
88
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:74:1
89
+ | ^^^^^^^^^^^^^^^^^^^
115
90
|
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
- | |_^
91
+ = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:28), 'x) })...
92
+ = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:29), 'y) })...
93
+ = note: ...so that the types are compatible:
94
+ expected TheTrait<(&'x isize, &'y isize)>
95
+ found TheTrait<(&isize, &isize)>
122
96
123
97
error: aborting due to 7 previous errors
124
98
125
- Some errors occurred: E0271, E0277 .
99
+ Some errors occurred: E0271, E0495 .
126
100
For more information about an error, try `rustc --explain E0271`.
0 commit comments