@@ -155,7 +155,7 @@ fn value_assigned_to_local<'a, 'tcx>(
155155 local : Local ,
156156) -> Option < & ' a mir:: Rvalue < ' tcx > > {
157157 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 {
159159 if local == * l {
160160 return Some ( & * rvalue) ;
161161 }
@@ -206,23 +206,22 @@ impl PeekCall {
206206
207207 assert_eq ! ( args. len( ) , 1 ) ;
208208 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+ } ) ;
218219 }
219- } ;
220+ }
220221
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 ;
226225 }
227226 }
228227
@@ -255,7 +254,7 @@ impl<'tcx, O> RustcPeekAt<'tcx> for DataflowResults<'tcx, O>
255254 let operator = self . operator ( ) ;
256255 let flow_state = dataflow:: state_for_location ( location, operator, self , body) ;
257256
258- match operator. move_data ( ) . rev_lookup . find ( place) {
257+ match operator. move_data ( ) . rev_lookup . find ( place. as_ref ( ) ) {
259258 LookupResult :: Exact ( peek_mpi) => {
260259 let bit_state = flow_state. contains ( peek_mpi) ;
261260 debug ! ( "rustc_peek({:?} = &{:?}) bit_state: {}" ,
0 commit comments