@@ -8,8 +8,7 @@ use matches::matches;
8
8
use rustc:: hir:: intravisit:: FnKind ;
9
9
use rustc:: hir:: * ;
10
10
use rustc:: lint:: { LateContext , LateLintPass , LintArray , LintPass } ;
11
- use rustc:: middle:: expr_use_visitor as euv;
12
- use rustc:: middle:: mem_categorization as mc;
11
+ use rustc_typeck:: expr_use_visitor as euv;
13
12
use rustc:: traits;
14
13
use rustc:: ty:: { self , RegionKind , TypeFoldable } ;
15
14
use rustc:: { declare_lint_pass, declare_tool_lint} ;
@@ -326,7 +325,7 @@ struct MovedVariablesCtxt {
326
325
}
327
326
328
327
impl MovedVariablesCtxt {
329
- fn move_common ( & mut self , cmt : & mc :: Place < ' _ > ) {
328
+ fn move_common ( & mut self , cmt : & euv :: Place < ' _ > ) {
330
329
let cmt = unwrap_downcast_or_interior ( cmt) ;
331
330
332
331
if let mc:: Categorization :: Local ( vid) = cmt. cat {
@@ -336,18 +335,18 @@ impl MovedVariablesCtxt {
336
335
}
337
336
338
337
impl < ' tcx > euv:: Delegate < ' tcx > for MovedVariablesCtxt {
339
- fn consume ( & mut self , cmt : & mc :: Place < ' tcx > , mode : euv:: ConsumeMode ) {
338
+ fn consume ( & mut self , cmt : & euv :: Place < ' tcx > , mode : euv:: ConsumeMode ) {
340
339
if let euv:: ConsumeMode :: Move = mode {
341
340
self . move_common ( cmt) ;
342
341
}
343
342
}
344
343
345
- fn borrow ( & mut self , _: & mc :: Place < ' tcx > , _: ty:: BorrowKind ) { }
344
+ fn borrow ( & mut self , _: & euv :: Place < ' tcx > , _: ty:: BorrowKind ) { }
346
345
347
- fn mutate ( & mut self , _: & mc :: Place < ' tcx > ) { }
346
+ fn mutate ( & mut self , _: & euv :: Place < ' tcx > ) { }
348
347
}
349
348
350
- fn unwrap_downcast_or_interior < ' a , ' tcx > ( mut cmt : & ' a mc :: Place < ' tcx > ) -> mc :: Place < ' tcx > {
349
+ fn unwrap_downcast_or_interior < ' a , ' tcx > ( mut cmt : & ' a euv :: Place < ' tcx > ) -> euv :: Place < ' tcx > {
351
350
loop {
352
351
match cmt. cat {
353
352
mc:: Categorization :: Downcast ( ref c, _) | mc:: Categorization :: Interior ( ref c, _) => {
0 commit comments