File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3913,6 +3913,8 @@ impl<'a> Resolver<'a> {
3913
3913
}
3914
3914
}
3915
3915
3916
+ /// Searches the current set of local scopes and
3917
+ /// applies translations for closures.
3916
3918
fn search_ribs ( & self ,
3917
3919
ribs : & [ Rib ] ,
3918
3920
name : Name ,
@@ -3934,6 +3936,8 @@ impl<'a> Resolver<'a> {
3934
3936
None
3935
3937
}
3936
3938
3939
+ /// Searches the current set of local scopes for labels.
3940
+ /// Stops after meeting a closure.
3937
3941
fn search_label ( & self , name : Name ) -> Option < DefLike > {
3938
3942
for rib in self . label_ribs . iter ( ) . rev ( ) {
3939
3943
match rib. kind {
@@ -3946,13 +3950,8 @@ impl<'a> Resolver<'a> {
3946
3950
}
3947
3951
}
3948
3952
let result = rib. bindings . get ( & name) . cloned ( ) ;
3949
- match result {
3950
- Some ( _) => {
3951
- return result
3952
- }
3953
- None => {
3954
- // Continue
3955
- }
3953
+ if result. is_some ( ) {
3954
+ return result
3956
3955
}
3957
3956
}
3958
3957
None
You can’t perform that action at this time.
0 commit comments