@@ -9,6 +9,7 @@ use rustc_trait_selection::traits;
9
9
use traits:: { translate_substs, Reveal } ;
10
10
11
11
use rustc_data_structures:: sso:: SsoHashSet ;
12
+ use std:: collections:: btree_map:: Entry ;
12
13
use std:: collections:: BTreeMap ;
13
14
use std:: ops:: ControlFlow ;
14
15
@@ -69,7 +70,6 @@ impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
69
70
{
70
71
return ControlFlow :: CONTINUE ;
71
72
}
72
- use std:: collections:: btree_map:: Entry ;
73
73
match * t. kind ( ) {
74
74
ty:: Bound ( debruijn, bound_ty) if debruijn == self . binder_index => {
75
75
match self . vars . entry ( bound_ty. var . as_u32 ( ) ) {
@@ -90,27 +90,18 @@ impl<'tcx> TypeVisitor<'tcx> for BoundVarsCollector<'tcx> {
90
90
}
91
91
92
92
fn visit_region ( & mut self , r : ty:: Region < ' tcx > ) -> ControlFlow < Self :: BreakTy > {
93
- use std:: collections:: btree_map:: Entry ;
94
93
match r {
95
- ty:: ReLateBound ( index, br) if * index == self . binder_index => match br. kind {
96
- ty:: BrNamed ( _def_id, _name) => {
97
- // FIXME
98
- }
99
-
100
- ty:: BrAnon ( var) => match self . vars . entry ( var) {
94
+ ty:: ReLateBound ( index, br) if * index == self . binder_index => {
95
+ match self . vars . entry ( br. var . as_u32 ( ) ) {
101
96
Entry :: Vacant ( entry) => {
102
97
entry. insert ( ty:: BoundVariableKind :: Region ( br. kind ) ) ;
103
98
}
104
99
Entry :: Occupied ( entry) => match entry. get ( ) {
105
100
ty:: BoundVariableKind :: Region ( _) => { }
106
101
_ => bug ! ( "Conflicting bound vars" ) ,
107
102
} ,
108
- } ,
109
-
110
- ty:: BrEnv => {
111
- // FIXME
112
103
}
113
- } ,
104
+ }
114
105
115
106
_ => ( ) ,
116
107
} ;
0 commit comments