@@ -4,10 +4,9 @@ use rustc_errors::{Applicability, DiagnosticBuilder};
4
4
use rustc_hir as hir;
5
5
use rustc_hir:: def_id:: DefId ;
6
6
use rustc_hir:: { AsyncGeneratorKind , GeneratorKind } ;
7
- use rustc_index:: vec:: Idx ;
8
7
use rustc_middle:: mir:: {
9
8
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 ,
11
10
ProjectionElem , Rvalue , Statement , StatementKind , Terminator , TerminatorKind , VarBindingForm ,
12
11
} ;
13
12
use rustc_middle:: ty:: { self , suggest_constraining_type_param, Ty , TypeFoldable } ;
@@ -1274,7 +1273,9 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
1274
1273
bug ! ( "temporary or return pointer with a name" )
1275
1274
}
1276
1275
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
+ {
1278
1279
"variable captured by `move` "
1279
1280
}
1280
1281
LocalKind :: Arg => "function parameter " ,
0 commit comments