]> git.lizzy.rs Git - rust.git/blob - tests/ui/variance/variance-btree-invariant-types.stderr
Rollup merge of #107037 - tmiasko:rank, r=oli-obk
[rust.git] / tests / ui / variance / variance-btree-invariant-types.stderr
1 error: lifetime may not live long enough
2   --> $DIR/variance-btree-invariant-types.rs:4:5
3    |
4 LL | fn iter_cov_key<'a, 'new>(v: IterMut<'a, &'static (), ()>) -> IterMut<'a, &'new (), ()> {
5    |                     ---- lifetime `'new` defined here
6 LL |     v
7    |     ^ returning this value requires that `'new` must outlive `'static`
8    |
9    = note: requirement occurs because of the type `std::collections::btree_map::IterMut<'_, &(), ()>`, which makes the generic argument `&()` invariant
10    = note: the struct `std::collections::btree_map::IterMut<'a, K, V>` is invariant over the parameter `K`
11    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
12
13 error: lifetime may not live long enough
14   --> $DIR/variance-btree-invariant-types.rs:8:5
15    |
16 LL | fn iter_cov_val<'a, 'new>(v: IterMut<'a, (), &'static ()>) -> IterMut<'a, (), &'new ()> {
17    |                     ---- lifetime `'new` defined here
18 LL |     v
19    |     ^ returning this value requires that `'new` must outlive `'static`
20    |
21    = note: requirement occurs because of the type `std::collections::btree_map::IterMut<'_, (), &()>`, which makes the generic argument `()` invariant
22    = note: the struct `std::collections::btree_map::IterMut<'a, K, V>` is invariant over the parameter `K`
23    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
24
25 error: lifetime may not live long enough
26   --> $DIR/variance-btree-invariant-types.rs:12:5
27    |
28 LL | fn iter_contra_key<'a, 'new>(v: IterMut<'a, &'new (), ()>) -> IterMut<'a, &'static (), ()> {
29    |                        ---- lifetime `'new` defined here
30 LL |     v
31    |     ^ returning this value requires that `'new` must outlive `'static`
32    |
33    = note: requirement occurs because of the type `std::collections::btree_map::IterMut<'_, &(), ()>`, which makes the generic argument `&()` invariant
34    = note: the struct `std::collections::btree_map::IterMut<'a, K, V>` is invariant over the parameter `K`
35    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
36
37 error: lifetime may not live long enough
38   --> $DIR/variance-btree-invariant-types.rs:16:5
39    |
40 LL | fn iter_contra_val<'a, 'new>(v: IterMut<'a, (), &'new ()>) -> IterMut<'a, (), &'static ()> {
41    |                        ---- lifetime `'new` defined here
42 LL |     v
43    |     ^ returning this value requires that `'new` must outlive `'static`
44    |
45    = note: requirement occurs because of the type `std::collections::btree_map::IterMut<'_, (), &()>`, which makes the generic argument `()` invariant
46    = note: the struct `std::collections::btree_map::IterMut<'a, K, V>` is invariant over the parameter `K`
47    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
48
49 error: lifetime may not live long enough
50   --> $DIR/variance-btree-invariant-types.rs:21:5
51    |
52 LL | fn range_cov_key<'a, 'new>(v: RangeMut<'a, &'static (), ()>) -> RangeMut<'a, &'new (), ()> {
53    |                      ---- lifetime `'new` defined here
54 LL |     v
55    |     ^ returning this value requires that `'new` must outlive `'static`
56    |
57    = note: requirement occurs because of the type `RangeMut<'_, &(), ()>`, which makes the generic argument `&()` invariant
58    = note: the struct `RangeMut<'a, K, V>` is invariant over the parameter `K`
59    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
60
61 error: lifetime may not live long enough
62   --> $DIR/variance-btree-invariant-types.rs:25:5
63    |
64 LL | fn range_cov_val<'a, 'new>(v: RangeMut<'a, (), &'static ()>) -> RangeMut<'a, (), &'new ()> {
65    |                      ---- lifetime `'new` defined here
66 LL |     v
67    |     ^ returning this value requires that `'new` must outlive `'static`
68    |
69    = note: requirement occurs because of the type `RangeMut<'_, (), &()>`, which makes the generic argument `()` invariant
70    = note: the struct `RangeMut<'a, K, V>` is invariant over the parameter `K`
71    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
72
73 error: lifetime may not live long enough
74   --> $DIR/variance-btree-invariant-types.rs:29:5
75    |
76 LL | fn range_contra_key<'a, 'new>(v: RangeMut<'a, &'new (), ()>) -> RangeMut<'a, &'static (), ()> {
77    |                         ---- lifetime `'new` defined here
78 LL |     v
79    |     ^ returning this value requires that `'new` must outlive `'static`
80    |
81    = note: requirement occurs because of the type `RangeMut<'_, &(), ()>`, which makes the generic argument `&()` invariant
82    = note: the struct `RangeMut<'a, K, V>` is invariant over the parameter `K`
83    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
84
85 error: lifetime may not live long enough
86   --> $DIR/variance-btree-invariant-types.rs:33:5
87    |
88 LL | fn range_contra_val<'a, 'new>(v: RangeMut<'a, (), &'new ()>) -> RangeMut<'a, (), &'static ()> {
89    |                         ---- lifetime `'new` defined here
90 LL |     v
91    |     ^ returning this value requires that `'new` must outlive `'static`
92    |
93    = note: requirement occurs because of the type `RangeMut<'_, (), &()>`, which makes the generic argument `()` invariant
94    = note: the struct `RangeMut<'a, K, V>` is invariant over the parameter `K`
95    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
96
97 error: lifetime may not live long enough
98   --> $DIR/variance-btree-invariant-types.rs:39:5
99    |
100 LL | fn occ_cov_key<'a, 'new>(v: OccupiedEntry<'a, &'static (), ()>)
101    |                    ---- lifetime `'new` defined here
102 LL |                          -> OccupiedEntry<'a, &'new (), ()> {
103 LL |     v
104    |     ^ returning this value requires that `'new` must outlive `'static`
105    |
106    = note: requirement occurs because of the type `std::collections::btree_map::OccupiedEntry<'_, &(), ()>`, which makes the generic argument `&()` invariant
107    = note: the struct `std::collections::btree_map::OccupiedEntry<'a, K, V, A>` is invariant over the parameter `K`
108    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
109
110 error: lifetime may not live long enough
111   --> $DIR/variance-btree-invariant-types.rs:44:5
112    |
113 LL | fn occ_cov_val<'a, 'new>(v: OccupiedEntry<'a, (), &'static ()>)
114    |                    ---- lifetime `'new` defined here
115 LL |                          -> OccupiedEntry<'a, (), &'new ()> {
116 LL |     v
117    |     ^ returning this value requires that `'new` must outlive `'static`
118    |
119    = note: requirement occurs because of the type `std::collections::btree_map::OccupiedEntry<'_, (), &()>`, which makes the generic argument `()` invariant
120    = note: the struct `std::collections::btree_map::OccupiedEntry<'a, K, V, A>` is invariant over the parameter `K`
121    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
122
123 error: lifetime may not live long enough
124   --> $DIR/variance-btree-invariant-types.rs:49:5
125    |
126 LL | fn occ_contra_key<'a, 'new>(v: OccupiedEntry<'a, &'new (), ()>)
127    |                       ---- lifetime `'new` defined here
128 LL |                             -> OccupiedEntry<'a, &'static (), ()> {
129 LL |     v
130    |     ^ returning this value requires that `'new` must outlive `'static`
131    |
132    = note: requirement occurs because of the type `std::collections::btree_map::OccupiedEntry<'_, &(), ()>`, which makes the generic argument `&()` invariant
133    = note: the struct `std::collections::btree_map::OccupiedEntry<'a, K, V, A>` is invariant over the parameter `K`
134    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
135
136 error: lifetime may not live long enough
137   --> $DIR/variance-btree-invariant-types.rs:54:5
138    |
139 LL | fn occ_contra_val<'a, 'new>(v: OccupiedEntry<'a, (), &'new ()>)
140    |                       ---- lifetime `'new` defined here
141 LL |                             -> OccupiedEntry<'a, (), &'static ()> {
142 LL |     v
143    |     ^ returning this value requires that `'new` must outlive `'static`
144    |
145    = note: requirement occurs because of the type `std::collections::btree_map::OccupiedEntry<'_, (), &()>`, which makes the generic argument `()` invariant
146    = note: the struct `std::collections::btree_map::OccupiedEntry<'a, K, V, A>` is invariant over the parameter `K`
147    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
148
149 error: lifetime may not live long enough
150   --> $DIR/variance-btree-invariant-types.rs:60:5
151    |
152 LL | fn vac_cov_key<'a, 'new>(v: VacantEntry<'a, &'static (), ()>)
153    |                    ---- lifetime `'new` defined here
154 LL |                          -> VacantEntry<'a, &'new (), ()> {
155 LL |     v
156    |     ^ returning this value requires that `'new` must outlive `'static`
157    |
158    = note: requirement occurs because of the type `std::collections::btree_map::VacantEntry<'_, &(), ()>`, which makes the generic argument `&()` invariant
159    = note: the struct `std::collections::btree_map::VacantEntry<'a, K, V, A>` is invariant over the parameter `K`
160    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
161
162 error: lifetime may not live long enough
163   --> $DIR/variance-btree-invariant-types.rs:65:5
164    |
165 LL | fn vac_cov_val<'a, 'new>(v: VacantEntry<'a, (), &'static ()>)
166    |                    ---- lifetime `'new` defined here
167 LL |                          -> VacantEntry<'a, (), &'new ()> {
168 LL |     v
169    |     ^ returning this value requires that `'new` must outlive `'static`
170    |
171    = note: requirement occurs because of the type `std::collections::btree_map::VacantEntry<'_, (), &()>`, which makes the generic argument `()` invariant
172    = note: the struct `std::collections::btree_map::VacantEntry<'a, K, V, A>` is invariant over the parameter `K`
173    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
174
175 error: lifetime may not live long enough
176   --> $DIR/variance-btree-invariant-types.rs:70:5
177    |
178 LL | fn vac_contra_key<'a, 'new>(v: VacantEntry<'a, &'new (), ()>)
179    |                       ---- lifetime `'new` defined here
180 LL |                             -> VacantEntry<'a, &'static (), ()> {
181 LL |     v
182    |     ^ returning this value requires that `'new` must outlive `'static`
183    |
184    = note: requirement occurs because of the type `std::collections::btree_map::VacantEntry<'_, &(), ()>`, which makes the generic argument `&()` invariant
185    = note: the struct `std::collections::btree_map::VacantEntry<'a, K, V, A>` is invariant over the parameter `K`
186    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
187
188 error: lifetime may not live long enough
189   --> $DIR/variance-btree-invariant-types.rs:75:5
190    |
191 LL | fn vac_contra_val<'a, 'new>(v: VacantEntry<'a, (), &'new ()>)
192    |                       ---- lifetime `'new` defined here
193 LL |                             -> VacantEntry<'a, (), &'static ()> {
194 LL |     v
195    |     ^ returning this value requires that `'new` must outlive `'static`
196    |
197    = note: requirement occurs because of the type `std::collections::btree_map::VacantEntry<'_, (), &()>`, which makes the generic argument `()` invariant
198    = note: the struct `std::collections::btree_map::VacantEntry<'a, K, V, A>` is invariant over the parameter `K`
199    = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
200
201 error: aborting due to 16 previous errors
202