@@ -69,23 +69,23 @@ pub(super) mod borrows;
69
69
/// Similarly, at a given `drop` statement, the set-intersection
70
70
/// between this data and `MaybeUninitializedLvals` yields the set of
71
71
/// l-values that would require a dynamic drop-flag at that statement.
72
- pub struct MaybeInitializedLvals < ' a , ' tcx : ' a > {
73
- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
72
+ pub struct MaybeInitializedLvals < ' a , ' gcx : ' tcx , ' tcx : ' a > {
73
+ tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
74
74
mir : & ' a Mir < ' tcx > ,
75
- mdpe : & ' a MoveDataParamEnv < ' tcx > ,
75
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > ,
76
76
}
77
77
78
- impl < ' a , ' tcx : ' a > MaybeInitializedLvals < ' a , ' tcx > {
79
- pub fn new ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
78
+ impl < ' a , ' gcx : ' tcx , ' tcx > MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
79
+ pub fn new ( tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
80
80
mir : & ' a Mir < ' tcx > ,
81
- mdpe : & ' a MoveDataParamEnv < ' tcx > )
81
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > )
82
82
-> Self
83
83
{
84
84
MaybeInitializedLvals { tcx : tcx, mir : mir, mdpe : mdpe }
85
85
}
86
86
}
87
87
88
- impl < ' a , ' tcx : ' a > HasMoveData < ' tcx > for MaybeInitializedLvals < ' a , ' tcx > {
88
+ impl < ' a , ' gcx , ' tcx > HasMoveData < ' tcx > for MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
89
89
fn move_data ( & self ) -> & MoveData < ' tcx > { & self . mdpe . move_data }
90
90
}
91
91
@@ -124,23 +124,23 @@ impl<'a, 'tcx: 'a> HasMoveData<'tcx> for MaybeInitializedLvals<'a, 'tcx> {
124
124
/// Similarly, at a given `drop` statement, the set-intersection
125
125
/// between this data and `MaybeInitializedLvals` yields the set of
126
126
/// l-values that would require a dynamic drop-flag at that statement.
127
- pub struct MaybeUninitializedLvals < ' a , ' tcx : ' a > {
128
- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
127
+ pub struct MaybeUninitializedLvals < ' a , ' gcx : ' tcx , ' tcx : ' a > {
128
+ tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
129
129
mir : & ' a Mir < ' tcx > ,
130
- mdpe : & ' a MoveDataParamEnv < ' tcx > ,
130
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > ,
131
131
}
132
132
133
- impl < ' a , ' tcx : ' a > MaybeUninitializedLvals < ' a , ' tcx > {
134
- pub fn new ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
133
+ impl < ' a , ' gcx , ' tcx > MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
134
+ pub fn new ( tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
135
135
mir : & ' a Mir < ' tcx > ,
136
- mdpe : & ' a MoveDataParamEnv < ' tcx > )
136
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > )
137
137
-> Self
138
138
{
139
139
MaybeUninitializedLvals { tcx : tcx, mir : mir, mdpe : mdpe }
140
140
}
141
141
}
142
142
143
- impl < ' a , ' tcx : ' a > HasMoveData < ' tcx > for MaybeUninitializedLvals < ' a , ' tcx > {
143
+ impl < ' a , ' gcx , ' tcx > HasMoveData < ' tcx > for MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
144
144
fn move_data ( & self ) -> & MoveData < ' tcx > { & self . mdpe . move_data }
145
145
}
146
146
@@ -185,27 +185,27 @@ impl<'a, 'tcx: 'a> HasMoveData<'tcx> for MaybeUninitializedLvals<'a, 'tcx> {
185
185
/// Similarly, at a given `drop` statement, the set-difference between
186
186
/// this data and `MaybeInitializedLvals` yields the set of l-values
187
187
/// that would require a dynamic drop-flag at that statement.
188
- pub struct DefinitelyInitializedLvals < ' a , ' tcx : ' a > {
189
- tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
188
+ pub struct DefinitelyInitializedLvals < ' a , ' gcx : ' tcx , ' tcx : ' a > {
189
+ tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
190
190
mir : & ' a Mir < ' tcx > ,
191
- mdpe : & ' a MoveDataParamEnv < ' tcx > ,
191
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > ,
192
192
}
193
193
194
- impl < ' a , ' tcx : ' a > DefinitelyInitializedLvals < ' a , ' tcx > {
195
- pub fn new ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
194
+ impl < ' a , ' gcx , ' tcx : ' a > DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
195
+ pub fn new ( tcx : TyCtxt < ' a , ' gcx , ' tcx > ,
196
196
mir : & ' a Mir < ' tcx > ,
197
- mdpe : & ' a MoveDataParamEnv < ' tcx > )
197
+ mdpe : & ' a MoveDataParamEnv < ' gcx , ' tcx > )
198
198
-> Self
199
199
{
200
200
DefinitelyInitializedLvals { tcx : tcx, mir : mir, mdpe : mdpe }
201
201
}
202
202
}
203
203
204
- impl < ' a , ' tcx : ' a > HasMoveData < ' tcx > for DefinitelyInitializedLvals < ' a , ' tcx > {
204
+ impl < ' a , ' gcx , ' tcx : ' a > HasMoveData < ' tcx > for DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
205
205
fn move_data ( & self ) -> & MoveData < ' tcx > { & self . mdpe . move_data }
206
206
}
207
207
208
- impl < ' a , ' tcx > MaybeInitializedLvals < ' a , ' tcx > {
208
+ impl < ' a , ' gcx , ' tcx > MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
209
209
fn update_bits ( sets : & mut BlockSets < MovePathIndex > , path : MovePathIndex ,
210
210
state : DropFlagState )
211
211
{
@@ -216,7 +216,7 @@ impl<'a, 'tcx> MaybeInitializedLvals<'a, 'tcx> {
216
216
}
217
217
}
218
218
219
- impl < ' a , ' tcx > MaybeUninitializedLvals < ' a , ' tcx > {
219
+ impl < ' a , ' gcx , ' tcx > MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
220
220
fn update_bits ( sets : & mut BlockSets < MovePathIndex > , path : MovePathIndex ,
221
221
state : DropFlagState )
222
222
{
@@ -227,7 +227,7 @@ impl<'a, 'tcx> MaybeUninitializedLvals<'a, 'tcx> {
227
227
}
228
228
}
229
229
230
- impl < ' a , ' tcx > DefinitelyInitializedLvals < ' a , ' tcx > {
230
+ impl < ' a , ' gcx , ' tcx > DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
231
231
fn update_bits ( sets : & mut BlockSets < MovePathIndex > , path : MovePathIndex ,
232
232
state : DropFlagState )
233
233
{
@@ -238,7 +238,7 @@ impl<'a, 'tcx> DefinitelyInitializedLvals<'a, 'tcx> {
238
238
}
239
239
}
240
240
241
- impl < ' a , ' tcx > BitDenotation for MaybeInitializedLvals < ' a , ' tcx > {
241
+ impl < ' a , ' gcx , ' tcx > BitDenotation for MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
242
242
type Idx = MovePathIndex ;
243
243
fn name ( ) -> & ' static str { "maybe_init" }
244
244
fn bits_per_block ( & self ) -> usize {
@@ -290,7 +290,7 @@ impl<'a, 'tcx> BitDenotation for MaybeInitializedLvals<'a, 'tcx> {
290
290
}
291
291
}
292
292
293
- impl < ' a , ' tcx > BitDenotation for MaybeUninitializedLvals < ' a , ' tcx > {
293
+ impl < ' a , ' gcx , ' tcx > BitDenotation for MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
294
294
type Idx = MovePathIndex ;
295
295
fn name ( ) -> & ' static str { "maybe_uninit" }
296
296
fn bits_per_block ( & self ) -> usize {
@@ -345,7 +345,7 @@ impl<'a, 'tcx> BitDenotation for MaybeUninitializedLvals<'a, 'tcx> {
345
345
}
346
346
}
347
347
348
- impl < ' a , ' tcx > BitDenotation for DefinitelyInitializedLvals < ' a , ' tcx > {
348
+ impl < ' a , ' gcx , ' tcx > BitDenotation for DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
349
349
type Idx = MovePathIndex ;
350
350
fn name ( ) -> & ' static str { "definite_init" }
351
351
fn bits_per_block ( & self ) -> usize {
@@ -399,21 +399,21 @@ impl<'a, 'tcx> BitDenotation for DefinitelyInitializedLvals<'a, 'tcx> {
399
399
}
400
400
}
401
401
402
- impl < ' a , ' tcx > BitwiseOperator for MaybeInitializedLvals < ' a , ' tcx > {
402
+ impl < ' a , ' gcx , ' tcx > BitwiseOperator for MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
403
403
#[ inline]
404
404
fn join ( & self , pred1 : usize , pred2 : usize ) -> usize {
405
405
pred1 | pred2 // "maybe" means we union effects of both preds
406
406
}
407
407
}
408
408
409
- impl < ' a , ' tcx > BitwiseOperator for MaybeUninitializedLvals < ' a , ' tcx > {
409
+ impl < ' a , ' gcx , ' tcx > BitwiseOperator for MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
410
410
#[ inline]
411
411
fn join ( & self , pred1 : usize , pred2 : usize ) -> usize {
412
412
pred1 | pred2 // "maybe" means we union effects of both preds
413
413
}
414
414
}
415
415
416
- impl < ' a , ' tcx > BitwiseOperator for DefinitelyInitializedLvals < ' a , ' tcx > {
416
+ impl < ' a , ' gcx , ' tcx > BitwiseOperator for DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
417
417
#[ inline]
418
418
fn join ( & self , pred1 : usize , pred2 : usize ) -> usize {
419
419
pred1 & pred2 // "definitely" means we intersect effects of both preds
@@ -430,21 +430,21 @@ impl<'a, 'tcx> BitwiseOperator for DefinitelyInitializedLvals<'a, 'tcx> {
430
430
// propagating, or you start at all-ones and then use Intersect as
431
431
// your merge when propagating.
432
432
433
- impl < ' a , ' tcx > DataflowOperator for MaybeInitializedLvals < ' a , ' tcx > {
433
+ impl < ' a , ' gcx , ' tcx > DataflowOperator for MaybeInitializedLvals < ' a , ' gcx , ' tcx > {
434
434
#[ inline]
435
435
fn bottom_value ( ) -> bool {
436
436
false // bottom = uninitialized
437
437
}
438
438
}
439
439
440
- impl < ' a , ' tcx > DataflowOperator for MaybeUninitializedLvals < ' a , ' tcx > {
440
+ impl < ' a , ' gcx , ' tcx > DataflowOperator for MaybeUninitializedLvals < ' a , ' gcx , ' tcx > {
441
441
#[ inline]
442
442
fn bottom_value ( ) -> bool {
443
443
false // bottom = initialized (start_block_effect counters this at outset)
444
444
}
445
445
}
446
446
447
- impl < ' a , ' tcx > DataflowOperator for DefinitelyInitializedLvals < ' a , ' tcx > {
447
+ impl < ' a , ' gcx , ' tcx > DataflowOperator for DefinitelyInitializedLvals < ' a , ' gcx , ' tcx > {
448
448
#[ inline]
449
449
fn bottom_value ( ) -> bool {
450
450
true // bottom = initialized (start_block_effect counters this at outset)
0 commit comments