1 error[E0308]: mismatched types
2 --> $DIR/variance-btree-invariant-types.rs:4:5
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 on the function body at 3:21...
10 --> $DIR/variance-btree-invariant-types.rs:3:21
12 LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, &'new (), ()> {
14 = note: ...does not necessarily outlive the static lifetime
16 error[E0308]: mismatched types
17 --> $DIR/variance-btree-invariant-types.rs:7:5
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 on the function body at 6:21...
25 --> $DIR/variance-btree-invariant-types.rs:6:21
27 LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, (), &'new ()> {
29 = note: ...does not necessarily outlive the static lifetime
31 error[E0308]: mismatched types
32 --> $DIR/variance-btree-invariant-types.rs:10:5
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 on the function body at 9:24...
40 --> $DIR/variance-btree-invariant-types.rs:9:24
42 LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, &'static (), ()> {
44 = note: ...does not necessarily outlive the static lifetime
46 error[E0308]: mismatched types
47 --> $DIR/variance-btree-invariant-types.rs:13:5
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 on the function body at 12:24...
55 --> $DIR/variance-btree-invariant-types.rs:12:24
57 LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, (), &'static ()> {
59 = note: ...does not necessarily outlive the static lifetime
61 error[E0308]: mismatched types
62 --> $DIR/variance-btree-invariant-types.rs:17:5
67 = note: expected struct `RangeMut<'_, &'new (), _>`
68 found struct `RangeMut<'_, &'static (), _>`
69 note: the lifetime `'new` as defined on the function body at 16:22...
70 --> $DIR/variance-btree-invariant-types.rs:16:22
72 LL | fn range_cov_key<'a, 'new>(v: RangeMut<'a, &'static (), ()>) -> RangeMut<'a, &'new (), ()> {
74 = note: ...does not necessarily outlive the static lifetime
76 error[E0308]: mismatched types
77 --> $DIR/variance-btree-invariant-types.rs:20:5
82 = note: expected struct `RangeMut<'_, _, &'new ()>`
83 found struct `RangeMut<'_, _, &'static ()>`
84 note: the lifetime `'new` as defined on the function body at 19:22...
85 --> $DIR/variance-btree-invariant-types.rs:19:22
87 LL | fn range_cov_val<'a, 'new>(v: RangeMut<'a, (), &'static ()>) -> RangeMut<'a, (), &'new ()> {
89 = note: ...does not necessarily outlive the static lifetime
91 error[E0308]: mismatched types
92 --> $DIR/variance-btree-invariant-types.rs:23:5
97 = note: expected struct `RangeMut<'_, &'static (), _>`
98 found struct `RangeMut<'_, &'new (), _>`
99 note: the lifetime `'new` as defined on the function body at 22:25...
100 --> $DIR/variance-btree-invariant-types.rs:22:25
102 LL | fn range_contra_key<'a, 'new>(v: RangeMut<'a, &'new (), ()>) -> RangeMut<'a, &'static (), ()> {
104 = note: ...does not necessarily outlive the static lifetime
106 error[E0308]: mismatched types
107 --> $DIR/variance-btree-invariant-types.rs:26:5
110 | ^ lifetime mismatch
112 = note: expected struct `RangeMut<'_, _, &'static ()>`
113 found struct `RangeMut<'_, _, &'new ()>`
114 note: the lifetime `'new` as defined on the function body at 25:25...
115 --> $DIR/variance-btree-invariant-types.rs:25:25
117 LL | fn range_contra_val<'a, 'new>(v: RangeMut<'a, (), &'new ()>) -> RangeMut<'a, (), &'static ()> {
119 = note: ...does not necessarily outlive the static lifetime
121 error[E0308]: mismatched types
122 --> $DIR/variance-btree-invariant-types.rs:31:5
125 | ^ lifetime mismatch
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 on the function body at 29:20...
130 --> $DIR/variance-btree-invariant-types.rs:29:20
132 LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>)
134 = note: ...does not necessarily outlive the static lifetime
136 error[E0308]: mismatched types
137 --> $DIR/variance-btree-invariant-types.rs:35:5
140 | ^ lifetime mismatch
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 on the function body at 33:20...
145 --> $DIR/variance-btree-invariant-types.rs:33:20
147 LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>)
149 = note: ...does not necessarily outlive the static lifetime
151 error[E0308]: mismatched types
152 --> $DIR/variance-btree-invariant-types.rs:39:5
155 | ^ lifetime mismatch
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 on the function body at 37:23...
160 --> $DIR/variance-btree-invariant-types.rs:37:23
162 LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>)
164 = note: ...does not necessarily outlive the static lifetime
166 error[E0308]: mismatched types
167 --> $DIR/variance-btree-invariant-types.rs:43:5
170 | ^ lifetime mismatch
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 on the function body at 41:23...
175 --> $DIR/variance-btree-invariant-types.rs:41:23
177 LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>)
179 = note: ...does not necessarily outlive the static lifetime
181 error[E0308]: mismatched types
182 --> $DIR/variance-btree-invariant-types.rs:48:5
185 | ^ lifetime mismatch
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 on the function body at 46:20...
190 --> $DIR/variance-btree-invariant-types.rs:46:20
192 LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>)
194 = note: ...does not necessarily outlive the static lifetime
196 error[E0308]: mismatched types
197 --> $DIR/variance-btree-invariant-types.rs:52:5
200 | ^ lifetime mismatch
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 on the function body at 50:20...
205 --> $DIR/variance-btree-invariant-types.rs:50:20
207 LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>)
209 = note: ...does not necessarily outlive the static lifetime
211 error[E0308]: mismatched types
212 --> $DIR/variance-btree-invariant-types.rs:56:5
215 | ^ lifetime mismatch
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 on the function body at 54:23...
220 --> $DIR/variance-btree-invariant-types.rs:54:23
222 LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>)
224 = note: ...does not necessarily outlive the static lifetime
226 error[E0308]: mismatched types
227 --> $DIR/variance-btree-invariant-types.rs:60:5
230 | ^ lifetime mismatch
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 on the function body at 58:23...
235 --> $DIR/variance-btree-invariant-types.rs:58:23
237 LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
239 = note: ...does not necessarily outlive the static lifetime
241 error: aborting due to 16 previous errors
243 For more information about this error, try `rustc --explain E0308`.