@@ -155,7 +155,7 @@ fn value_assigned_to_local<'a, 'tcx>(
155
155
local : Local ,
156
156
) -> Option < & ' a mir:: Rvalue < ' tcx > > {
157
157
if let mir:: StatementKind :: Assign ( place, rvalue) = & stmt. kind {
158
- if let mir:: Place :: Base ( mir:: PlaceBase :: Local ( l) ) = place {
158
+ if let mir:: Place { base : mir:: PlaceBase :: Local ( l) , projection : None } = place {
159
159
if local == * l {
160
160
return Some ( & * rvalue) ;
161
161
}
@@ -206,23 +206,22 @@ impl PeekCall {
206
206
207
207
assert_eq ! ( args. len( ) , 1 ) ;
208
208
let kind = PeekCallKind :: from_arg_ty ( substs. type_at ( 0 ) ) ;
209
- let arg = match args[ 0 ] {
210
- | mir:: Operand :: Copy ( mir:: Place :: Base ( mir:: PlaceBase :: Local ( local) ) )
211
- | mir:: Operand :: Move ( mir:: Place :: Base ( mir:: PlaceBase :: Local ( local) ) )
212
- => local,
213
-
214
- _ => {
215
- tcx. sess . diagnostic ( ) . span_err (
216
- span, "dataflow::sanity_check cannot feed a non-temp to rustc_peek." ) ;
217
- return None ;
209
+ if let mir:: Operand :: Copy ( place) | mir:: Operand :: Move ( place) = & args[ 0 ] {
210
+ if let mir:: Place {
211
+ base : mir:: PlaceBase :: Local ( local) ,
212
+ projection : None
213
+ } = * place {
214
+ return Some ( PeekCall {
215
+ arg : local,
216
+ kind,
217
+ span,
218
+ } ) ;
218
219
}
219
- } ;
220
+ }
220
221
221
- return Some ( PeekCall {
222
- arg,
223
- kind,
224
- span,
225
- } ) ;
222
+ tcx. sess . diagnostic ( ) . span_err (
223
+ span, "dataflow::sanity_check cannot feed a non-temp to rustc_peek." ) ;
224
+ return None ;
226
225
}
227
226
}
228
227
@@ -255,7 +254,7 @@ impl<'tcx, O> RustcPeekAt<'tcx> for DataflowResults<'tcx, O>
255
254
let operator = self . operator ( ) ;
256
255
let flow_state = dataflow:: state_for_location ( location, operator, self , body) ;
257
256
258
- match operator. move_data ( ) . rev_lookup . find ( place) {
257
+ match operator. move_data ( ) . rev_lookup . find ( place. as_ref ( ) ) {
259
258
LookupResult :: Exact ( peek_mpi) => {
260
259
let bit_state = flow_state. contains ( peek_mpi) ;
261
260
debug ! ( "rustc_peek({:?} = &{:?}) bit_state: {}" ,
0 commit comments