File tree 1 file changed +2
-6
lines changed
compiler/rustc_mir_build/src/thir/cx
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use rustc_hir as hir;
8
8
use rustc_hir:: def:: DefKind ;
9
9
use rustc_hir:: def_id:: { DefId , LocalDefId } ;
10
10
use rustc_hir:: lang_items:: LangItem ;
11
- use rustc_hir:: { HirId , Node } ;
11
+ use rustc_hir:: HirId ;
12
12
use rustc_middle:: bug;
13
13
use rustc_middle:: middle:: region;
14
14
use rustc_middle:: thir:: * ;
@@ -110,11 +110,7 @@ impl<'tcx> Cx<'tcx> {
110
110
}
111
111
112
112
#[ instrument( level = "debug" , skip( self ) ) ]
113
- fn pattern_from_hir ( & mut self , p : & hir:: Pat < ' _ > ) -> Box < Pat < ' tcx > > {
114
- let p = match self . tcx . hir_node ( p. hir_id ) {
115
- Node :: Pat ( p) => p,
116
- node => bug ! ( "pattern became {:?}" , node) ,
117
- } ;
113
+ fn pattern_from_hir ( & mut self , p : & ' tcx hir:: Pat < ' tcx > ) -> Box < Pat < ' tcx > > {
118
114
pat_from_hir ( self . tcx , self . param_env , self . typeck_results ( ) , p)
119
115
}
120
116
You can’t perform that action at this time.
0 commit comments