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:18:5
67 = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
68 found struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
69 note: the lifetime `'new` as defined on the function body at 16:20...
70 --> $DIR/variance-btree-invariant-types.rs:16:20
72 LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>)
74 = note: ...does not necessarily outlive the static lifetime
76 error[E0308]: mismatched types
77 --> $DIR/variance-btree-invariant-types.rs:22:5
82 = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
83 found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
84 note: the lifetime `'new` as defined on the function body at 20:20...
85 --> $DIR/variance-btree-invariant-types.rs:20:20
87 LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>)
89 = note: ...does not necessarily outlive the static lifetime
91 error[E0308]: mismatched types
92 --> $DIR/variance-btree-invariant-types.rs:26:5
97 = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, &'static (), _>`
98 found struct `std::collections::btree_map::OccupiedEntry<'_, &'new (), _>`
99 note: the lifetime `'new` as defined on the function body at 24:23...
100 --> $DIR/variance-btree-invariant-types.rs:24:23
102 LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>)
104 = note: ...does not necessarily outlive the static lifetime
106 error[E0308]: mismatched types
107 --> $DIR/variance-btree-invariant-types.rs:30:5
110 | ^ lifetime mismatch
112 = note: expected struct `std::collections::btree_map::OccupiedEntry<'_, _, &'static ()>`
113 found struct `std::collections::btree_map::OccupiedEntry<'_, _, &'new ()>`
114 note: the lifetime `'new` as defined on the function body at 28:23...
115 --> $DIR/variance-btree-invariant-types.rs:28:23
117 LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>)
119 = note: ...does not necessarily outlive the static lifetime
121 error[E0308]: mismatched types
122 --> $DIR/variance-btree-invariant-types.rs:35:5
125 | ^ lifetime mismatch
127 = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
128 found struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
129 note: the lifetime `'new` as defined on the function body at 33:20...
130 --> $DIR/variance-btree-invariant-types.rs:33:20
132 LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>)
134 = note: ...does not necessarily outlive the static lifetime
136 error[E0308]: mismatched types
137 --> $DIR/variance-btree-invariant-types.rs:39:5
140 | ^ lifetime mismatch
142 = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
143 found struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
144 note: the lifetime `'new` as defined on the function body at 37:20...
145 --> $DIR/variance-btree-invariant-types.rs:37:20
147 LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>)
149 = note: ...does not necessarily outlive the static lifetime
151 error[E0308]: mismatched types
152 --> $DIR/variance-btree-invariant-types.rs:43:5
155 | ^ lifetime mismatch
157 = note: expected struct `std::collections::btree_map::VacantEntry<'_, &'static (), _>`
158 found struct `std::collections::btree_map::VacantEntry<'_, &'new (), _>`
159 note: the lifetime `'new` as defined on the function body at 41:23...
160 --> $DIR/variance-btree-invariant-types.rs:41:23
162 LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>)
164 = note: ...does not necessarily outlive the static lifetime
166 error[E0308]: mismatched types
167 --> $DIR/variance-btree-invariant-types.rs:47:5
170 | ^ lifetime mismatch
172 = note: expected struct `std::collections::btree_map::VacantEntry<'_, _, &'static ()>`
173 found struct `std::collections::btree_map::VacantEntry<'_, _, &'new ()>`
174 note: the lifetime `'new` as defined on the function body at 45:23...
175 --> $DIR/variance-btree-invariant-types.rs:45:23
177 LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
179 = note: ...does not necessarily outlive the static lifetime
181 error: aborting due to 12 previous errors
183 For more information about this error, try `rustc --explain E0308`.