@@ -4,10 +4,9 @@ use rustc_errors::{Applicability, DiagnosticBuilder};
44use rustc_hir as hir;
55use rustc_hir:: def_id:: DefId ;
66use rustc_hir:: { AsyncGeneratorKind , GeneratorKind } ;
7- use rustc_index:: vec:: Idx ;
87use rustc_middle:: mir:: {
98 self , AggregateKind , BindingForm , BorrowKind , ClearCrossCrate , ConstraintCategory ,
10- FakeReadCause , Local , LocalDecl , LocalInfo , LocalKind , Location , Operand , Place , PlaceRef ,
9+ FakeReadCause , LocalDecl , LocalInfo , LocalKind , Location , Operand , Place , PlaceRef ,
1110 ProjectionElem , Rvalue , Statement , StatementKind , Terminator , TerminatorKind , VarBindingForm ,
1211} ;
1312use rustc_middle:: ty:: { self , suggest_constraining_type_param, Ty , TypeFoldable } ;
@@ -1274,7 +1273,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
12741273 bug ! ( "temporary or return pointer with a name" )
12751274 }
12761275 LocalKind :: Var => "local variable " ,
1277- LocalKind :: Arg if !self . upvars . is_empty ( ) && local == Local :: new ( 1 ) => {
1276+ LocalKind :: Arg
1277+ if !self . upvars . is_empty ( ) && local == ty:: CAPTURE_STRUCT_LOCAL =>
1278+ {
12781279 "variable captured by `move` "
12791280 }
12801281 LocalKind :: Arg => "function parameter " ,
0 commit comments