/// Reports an error if this is a borrow of local data.
/// This is called for all Yield statements on movable generators
Reports an error if this is a borrow of local data.
This is called for all Yield statements on movable generators
Reports an error if this is a borrow of local data . This is called for all Yield statements on movable generators
fn check_for_local_borrow(&mut self, borrow: &BorrowData<'tcx>, yield_span: Span) {
        debug!("check_for_local_borrow({:?})", borrow);
        if borrow_of_local_data(&borrow.borrowed_place) {
            let err = self.tcx
                .cannot_borrow_across_generator_yield(
                    self.retrieve_borrow_spans(borrow).var_or_use(),
                    yield_span,
                    Origin::Mir,
                );
            err.buffer(&mut self.errors_buffer);
        }
    }
fn check_for_local_borrow ( & mut self , borrow : & BorrowData < ' tcx > , yield_span : Span ) { debug ! ( " " borrow ) ; if borrow_of_local_data ( & borrow . borrowed_place ) { let err = self . tcx . cannot_borrow_across_generator_yield ( self . retrieve_borrow_spans ( borrow ) . var_or_use ( ) , yield_span , Origin :: Mir , ) ; err . buffer ( & mut self . errors_buffer ) ; } }
Reports an error if this is a borrow of local data.
Reports an error if this is a borrow of local data .
&mut self
borrow
&BorrowData<'tcx>
yield_span
Span