@@ -9,15 +9,18 @@ use crate::build::scope::DropKind;
9
9
use crate :: build:: ForGuard :: { self , OutsideGuard , RefWithinGuard } ;
10
10
use crate :: build:: { BlockAnd , BlockAndExtension , Builder } ;
11
11
use crate :: build:: { GuardFrame , GuardFrameLocal , LocalsForNode } ;
12
- use crate :: hair:: { self , * } ;
13
- use rustc_data_structures:: { fx:: { FxHashMap , FxHashSet } , stack:: ensure_sufficient_stack} ;
12
+ use crate :: thir:: { self , * } ;
13
+ use rustc_data_structures:: {
14
+ fx:: { FxHashMap , FxHashSet } ,
15
+ stack:: ensure_sufficient_stack,
16
+ } ;
14
17
use rustc_hir:: HirId ;
15
18
use rustc_index:: bit_set:: BitSet ;
16
19
use rustc_middle:: middle:: region;
17
20
use rustc_middle:: mir:: * ;
18
21
use rustc_middle:: ty:: { self , CanonicalUserTypeAnnotation , Ty } ;
19
- use rustc_span:: Span ;
20
22
use rustc_span:: symbol:: Symbol ;
23
+ use rustc_span:: Span ;
21
24
use rustc_target:: abi:: VariantIdx ;
22
25
use smallvec:: { smallvec, SmallVec } ;
23
26
@@ -395,7 +398,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
395
398
..
396
399
} ,
397
400
ascription :
398
- hair :: pattern:: Ascription { user_ty : pat_ascription_ty, variance : _, user_ty_span } ,
401
+ thir :: pattern:: Ascription { user_ty : pat_ascription_ty, variance : _, user_ty_span } ,
399
402
} => {
400
403
let place =
401
404
self . storage_live_binding ( block, var, irrefutable_pat. span , OutsideGuard , true ) ;
@@ -631,7 +634,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
631
634
632
635
PatKind :: AscribeUserType {
633
636
ref subpattern,
634
- ascription : hair :: pattern:: Ascription { ref user_ty, user_ty_span, variance : _ } ,
637
+ ascription : thir :: pattern:: Ascription { ref user_ty, user_ty_span, variance : _ } ,
635
638
} => {
636
639
// This corresponds to something like
637
640
//
@@ -1982,16 +1985,18 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1982
1985
source_info,
1983
1986
internal : false ,
1984
1987
is_block_tail : None ,
1985
- local_info : Some ( box LocalInfo :: User ( ClearCrossCrate :: Set ( BindingForm :: Var ( VarBindingForm {
1986
- binding_mode,
1987
- // hypothetically, `visit_primary_bindings` could try to unzip
1988
- // an outermost hir::Ty as we descend, matching up
1989
- // idents in pat; but complex w/ unclear UI payoff.
1990
- // Instead, just abandon providing diagnostic info.
1991
- opt_ty_info : None ,
1992
- opt_match_place,
1993
- pat_span,
1994
- } ) ) ) ) ,
1988
+ local_info : Some ( box LocalInfo :: User ( ClearCrossCrate :: Set ( BindingForm :: Var (
1989
+ VarBindingForm {
1990
+ binding_mode,
1991
+ // hypothetically, `visit_primary_bindings` could try to unzip
1992
+ // an outermost hir::Ty as we descend, matching up
1993
+ // idents in pat; but complex w/ unclear UI payoff.
1994
+ // Instead, just abandon providing diagnostic info.
1995
+ opt_ty_info : None ,
1996
+ opt_match_place,
1997
+ pat_span,
1998
+ } ,
1999
+ ) ) ) ) ,
1995
2000
} ;
1996
2001
let for_arm_body = self . local_decls . push ( local) ;
1997
2002
self . var_debug_info . push ( VarDebugInfo {
@@ -2009,7 +2014,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
2009
2014
source_info,
2010
2015
internal : false ,
2011
2016
is_block_tail : None ,
2012
- local_info : Some ( box LocalInfo :: User ( ClearCrossCrate :: Set ( BindingForm :: RefForGuard ) ) ) ,
2017
+ local_info : Some ( box LocalInfo :: User ( ClearCrossCrate :: Set (
2018
+ BindingForm :: RefForGuard ,
2019
+ ) ) ) ,
2013
2020
} ) ;
2014
2021
self . var_debug_info . push ( VarDebugInfo {
2015
2022
name,
0 commit comments