Lifetime variance fixes for rustc
This commit is contained in:
parent
4bb4dc4672
commit
1784634a39
22 changed files with 92 additions and 86 deletions
|
@ -1,5 +1,6 @@
|
|||
use either::Either;
|
||||
use rustc_const_eval::util::CallKind;
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_errors::{Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, MultiSpan};
|
||||
use rustc_hir as hir;
|
||||
|
@ -1622,10 +1623,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
location: Location,
|
||||
mpi: MovePathIndex,
|
||||
) -> (Vec<MoveSite>, Vec<Location>) {
|
||||
fn predecessor_locations<'a>(
|
||||
body: &'a mir::Body<'_>,
|
||||
fn predecessor_locations<'tcx, 'a>(
|
||||
body: &'a mir::Body<'tcx>,
|
||||
location: Location,
|
||||
) -> impl Iterator<Item = Location> + 'a {
|
||||
) -> impl Iterator<Item = Location> + Captures<'tcx> + 'a {
|
||||
if location.statement_index == 0 {
|
||||
let predecessors = body.predecessors()[location.block].to_vec();
|
||||
Either::Left(predecessors.into_iter().map(move |bb| body.terminator_loc(bb)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue