]> git.lizzy.rs Git - rust.git/blob - src/test/ui/variance/variance-btree-invariant-types.stderr
Rollup merge of #93389 - cameron1024:issue-90847-regression, r=Mark-Simulacrum
[rust.git] / src / test / ui / variance / variance-btree-invariant-types.stderr
1 error[E0308]: mismatched types
2   --> $DIR/variance-btree-invariant-types.rs:4:5
3    |
4 LL |     v
5    |     ^ lifetime mismatch
6    |
7    = note: expected struct `std::collections::btree_map::IterMut<'_, &'new (), _>`
8               found struct `std::collections::btree_map::IterMut<'_, &'static (), _>`
9 note: the lifetime `'new` as defined here...
10   --> $DIR/variance-btree-invariant-types.rs:3:21
11    |
12 LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, &'new (), ()> {
13    |                     ^^^^
14    = note: ...does not necessarily outlive the static lifetime
15
16 error[E0308]: mismatched types
17   --> $DIR/variance-btree-invariant-types.rs:7:5
18    |
19 LL |     v
20    |     ^ lifetime mismatch
21    |
22    = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'new ()>`
23               found struct `std::collections::btree_map::IterMut<'_, _, &'static ()>`
24 note: the lifetime `'new` as defined here...
25   --> $DIR/variance-btree-invariant-types.rs:6:21
26    |
27 LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, (), &'new ()> {
28    |                     ^^^^
29    = note: ...does not necessarily outlive the static lifetime
30
31 error[E0308]: mismatched types
32   --> $DIR/variance-btree-invariant-types.rs:10:5
33    |
34 LL |     v
35    |     ^ lifetime mismatch
36    |
37    = note: expected struct `std::collections::btree_map::IterMut<'_, &'static (), _>`
38               found struct `std::collections::btree_map::IterMut<'_, &'new (), _>`
39 note: the lifetime `'new` as defined here...
40   --> $DIR/variance-btree-invariant-types.rs:9:24
41    |
42 LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, &'static (), ()> {
43    |                        ^^^^
44    = note: ...does not necessarily outlive the static lifetime
45
46 error[E0308]: mismatched types
47   --> $DIR/variance-btree-invariant-types.rs:13:5
48    |
49 LL |     v
50    |     ^ lifetime mismatch
51    |
52    = note: expected struct `std::collections::btree_map::IterMut<'_, _, &'static ()>`
53               found struct `std::collections::btree_map::IterMut<'_, _, &'new ()>`
54 note: the lifetime `'new` as defined here...
55   --> $DIR/variance-btree-invariant-types.rs:12:24
56    |
57 LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, (), &'static ()> {
58    |                        ^^^^
59    = note: ...does not necessarily outlive the static lifetime
60
61 error[E0308]: mismatched types
62   --> $DIR/variance-btree-invariant-types.rs:17:5
63    |
64 LL |     v
65    |     ^ lifetime mismatch
66    |
67    = note: expected struct `RangeMut<'_, &'new (), _>`
68               found struct `RangeMut<'_, &'static (), _>`
69 note: the lifetime `'new` as defined here...
70   --> $DIR/variance-btree-invariant-types.rs:16:22
71    |
72 LL | fn range_cov_key<'a, 'new>(v: RangeMut<'a, &'static (), ()>) -> RangeMut<'a, &'new (), ()> {
73    |                      ^^^^
74    = note: ...does not necessarily outlive the static lifetime
75
76 error[E0308]: mismatched types
77   --> $DIR/variance-btree-invariant-types.rs:20:5
78    |
79 LL |     v
80    |     ^ lifetime mismatch
81    |
82    = note: expected struct `RangeMut<'_, _, &'new ()>`
83               found struct `RangeMut<'_, _, &'static ()>`
84 note: the lifetime `'new` as defined here...
85   --> $DIR/variance-btree-invariant-types.rs:19:22
86    |
87 LL | fn range_cov_val<'a, 'new>(v: RangeMut<'a, (), &'static ()>) -> RangeMut<'a, (), &'new ()> {
88    |                      ^^^^
89    = note: ...does not necessarily outlive the static lifetime
90
91 error[E0308]: mismatched types
92   --> $DIR/variance-btree-invariant-types.rs:23:5
93    |
94 LL |     v
95    |     ^ lifetime mismatch
96    |
97    = note: expected struct `RangeMut<'_, &'static (), _>`
98               found struct `RangeMut<'_, &'new (), _>`
99 note: the lifetime `'new` as defined here...
100   --> $DIR/variance-btree-invariant-types.rs:22:25
101    |
102 LL | fn range_contra_key<'a, 'new>(v: RangeMut<'a, &'new (), ()>) -> RangeMut<'a, &'static (), ()> {
103    |                         ^^^^
104    = note: ...does not necessarily outlive the static lifetime
105
106 error[E0308]: mismatched types
107   --> $DIR/variance-btree-invariant-types.rs:26:5
108    |
109 LL |     v
110    |     ^ lifetime mismatch
111    |
112    = note: expected struct `RangeMut<'_, _, &'static ()>`
113               found struct `RangeMut<'_, _, &'new ()>`
114 note: the lifetime `'new` as defined here...
115   --> $DIR/variance-btree-invariant-types.rs:25:25
116    |
117 LL | fn range_contra_val<'a, 'new>(v: RangeMut<'a, (), &'new ()>) -> RangeMut<'a, (), &'static ()> {
118    |                         ^^^^
119    = note: ...does not necessarily outlive the static lifetime
120
121 error[E0308]: mismatched types
122   --> $DIR/variance-btree-invariant-types.rs:31:5
123    |
124 LL |     v
125    |     ^ lifetime mismatch
126    |
127    = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
128               found struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
129 note: the lifetime `'new` as defined here...
130   --> $DIR/variance-btree-invariant-types.rs:29:20
131    |
132 LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>)
133    |                    ^^^^
134    = note: ...does not necessarily outlive the static lifetime
135
136 error[E0308]: mismatched types
137   --> $DIR/variance-btree-invariant-types.rs:35:5
138    |
139 LL |     v
140    |     ^ lifetime mismatch
141    |
142    = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
143               found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
144 note: the lifetime `'new` as defined here...
145   --> $DIR/variance-btree-invariant-types.rs:33:20
146    |
147 LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>)
148    |                    ^^^^
149    = note: ...does not necessarily outlive the static lifetime
150
151 error[E0308]: mismatched types
152   --> $DIR/variance-btree-invariant-types.rs:39:5
153    |
154 LL |     v
155    |     ^ lifetime mismatch
156    |
157    = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
158               found struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
159 note: the lifetime `'new` as defined here...
160   --> $DIR/variance-btree-invariant-types.rs:37:23
161    |
162 LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>)
163    |                       ^^^^
164    = note: ...does not necessarily outlive the static lifetime
165
166 error[E0308]: mismatched types
167   --> $DIR/variance-btree-invariant-types.rs:43:5
168    |
169 LL |     v
170    |     ^ lifetime mismatch
171    |
172    = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
173               found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
174 note: the lifetime `'new` as defined here...
175   --> $DIR/variance-btree-invariant-types.rs:41:23
176    |
177 LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>)
178    |                       ^^^^
179    = note: ...does not necessarily outlive the static lifetime
180
181 error[E0308]: mismatched types
182   --> $DIR/variance-btree-invariant-types.rs:48:5
183    |
184 LL |     v
185    |     ^ lifetime mismatch
186    |
187    = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
188               found struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
189 note: the lifetime `'new` as defined here...
190   --> $DIR/variance-btree-invariant-types.rs:46:20
191    |
192 LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>)
193    |                    ^^^^
194    = note: ...does not necessarily outlive the static lifetime
195
196 error[E0308]: mismatched types
197   --> $DIR/variance-btree-invariant-types.rs:52:5
198    |
199 LL |     v
200    |     ^ lifetime mismatch
201    |
202    = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
203               found struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
204 note: the lifetime `'new` as defined here...
205   --> $DIR/variance-btree-invariant-types.rs:50:20
206    |
207 LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>)
208    |                    ^^^^
209    = note: ...does not necessarily outlive the static lifetime
210
211 error[E0308]: mismatched types
212   --> $DIR/variance-btree-invariant-types.rs:56:5
213    |
214 LL |     v
215    |     ^ lifetime mismatch
216    |
217    = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
218               found struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
219 note: the lifetime `'new` as defined here...
220   --> $DIR/variance-btree-invariant-types.rs:54:23
221    |
222 LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>)
223    |                       ^^^^
224    = note: ...does not necessarily outlive the static lifetime
225
226 error[E0308]: mismatched types
227   --> $DIR/variance-btree-invariant-types.rs:60:5
228    |
229 LL |     v
230    |     ^ lifetime mismatch
231    |
232    = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
233               found struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
234 note: the lifetime `'new` as defined here...
235   --> $DIR/variance-btree-invariant-types.rs:58:23
236    |
237 LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
238    |                       ^^^^
239    = note: ...does not necessarily outlive the static lifetime
240
241 error: aborting due to 16 previous errors
242
243 For more information about this error, try `rustc --explain E0308`.