}
}
+ /// Searches the current set of local scopes and
+ /// applies translations for closures.
fn search_ribs(&self,
ribs: &[Rib],
name: Name,
None
}
+ /// Searches the current set of local scopes for labels.
+ /// Stops after meeting a closure.
fn search_label(&self, name: Name) -> Option<DefLike> {
for rib in self.label_ribs.iter().rev() {
match rib.kind {
}
}
let result = rib.bindings.get(&name).cloned();
- match result {
- Some(_) => {
- return result
- }
- None => {
- // Continue
- }
+ if result.is_some() {
+ return result
}
}
None