@@ -220,6 +220,27 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for mir::Place<'gcx> {
220
220
}
221
221
}
222
222
223
+ impl < ' a , ' gcx > HashStable < StableHashingContext < ' a > > for mir:: PlaceBase < ' gcx > {
224
+ fn hash_stable < W : StableHasherResult > ( & self ,
225
+ hcx : & mut StableHashingContext < ' a > ,
226
+ hasher : & mut StableHasher < W > ) {
227
+ mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
228
+ match self {
229
+ mir:: PlaceBase :: Local ( local) => {
230
+ local. hash_stable ( hcx, hasher) ;
231
+ }
232
+ mir:: PlaceBase :: Static ( statik) => {
233
+ statik. hash_stable ( hcx, hasher) ;
234
+ }
235
+ mir:: PlaceBase :: Promoted ( promoted) => {
236
+ promoted. hash_stable ( hcx, hasher) ;
237
+ }
238
+ }
239
+ }
240
+ }
241
+
242
+ impl_stable_hash_for ! ( struct mir:: NeoPlace <' tcx> { base, elems } ) ;
243
+
223
244
impl < ' a , ' gcx , B , V , T > HashStable < StableHashingContext < ' a > >
224
245
for mir:: Projection < ' gcx , B , V , T >
225
246
where B : HashStable < StableHashingContext < ' a > > ,
@@ -322,45 +343,45 @@ impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for mir::Rvalue<'gcx> {
322
343
hasher : & mut StableHasher < W > ) {
323
344
mem:: discriminant ( self ) . hash_stable ( hcx, hasher) ;
324
345
325
- match * self {
326
- mir:: Rvalue :: Use ( ref operand) => {
346
+ match self {
347
+ mir:: Rvalue :: Use ( operand) => {
327
348
operand. hash_stable ( hcx, hasher) ;
328
349
}
329
- mir:: Rvalue :: Repeat ( ref operand, ref val) => {
350
+ mir:: Rvalue :: Repeat ( operand, val) => {
330
351
operand. hash_stable ( hcx, hasher) ;
331
352
val. hash_stable ( hcx, hasher) ;
332
353
}
333
- mir:: Rvalue :: Ref ( region, borrow_kind, ref place) => {
354
+ mir:: Rvalue :: Ref ( region, borrow_kind, place) => {
334
355
region. hash_stable ( hcx, hasher) ;
335
356
borrow_kind. hash_stable ( hcx, hasher) ;
336
357
place. hash_stable ( hcx, hasher) ;
337
358
}
338
- mir:: Rvalue :: Len ( ref place) => {
359
+ mir:: Rvalue :: Len ( place) => {
339
360
place. hash_stable ( hcx, hasher) ;
340
361
}
341
- mir:: Rvalue :: Cast ( cast_kind, ref operand, ty) => {
362
+ mir:: Rvalue :: Cast ( cast_kind, operand, ty) => {
342
363
cast_kind. hash_stable ( hcx, hasher) ;
343
364
operand. hash_stable ( hcx, hasher) ;
344
365
ty. hash_stable ( hcx, hasher) ;
345
366
}
346
- mir:: Rvalue :: BinaryOp ( op, ref operand1, ref operand2) |
347
- mir:: Rvalue :: CheckedBinaryOp ( op, ref operand1, ref operand2) => {
367
+ mir:: Rvalue :: BinaryOp ( op, operand1, operand2) |
368
+ mir:: Rvalue :: CheckedBinaryOp ( op, operand1, operand2) => {
348
369
op. hash_stable ( hcx, hasher) ;
349
370
operand1. hash_stable ( hcx, hasher) ;
350
371
operand2. hash_stable ( hcx, hasher) ;
351
372
}
352
- mir:: Rvalue :: UnaryOp ( op, ref operand) => {
373
+ mir:: Rvalue :: UnaryOp ( op, operand) => {
353
374
op. hash_stable ( hcx, hasher) ;
354
375
operand. hash_stable ( hcx, hasher) ;
355
376
}
356
- mir:: Rvalue :: Discriminant ( ref place) => {
377
+ mir:: Rvalue :: Discriminant ( place) => {
357
378
place. hash_stable ( hcx, hasher) ;
358
379
}
359
380
mir:: Rvalue :: NullaryOp ( op, ty) => {
360
381
op. hash_stable ( hcx, hasher) ;
361
382
ty. hash_stable ( hcx, hasher) ;
362
383
}
363
- mir:: Rvalue :: Aggregate ( ref kind, ref operands) => {
384
+ mir:: Rvalue :: Aggregate ( kind, operands) => {
364
385
kind. hash_stable ( hcx, hasher) ;
365
386
operands. hash_stable ( hcx, hasher) ;
366
387
}
0 commit comments