We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap_or_else
unwrap_or
1 parent 31ee872 commit 1c1c591Copy full SHA for 1c1c591
compiler/rustc_resolve/src/lib.rs
@@ -1725,10 +1725,9 @@ impl<'a> Resolver<'a> {
1725
Scope::MacroRules(binding.parent_macro_rules_scope)
1726
}
1727
MacroRulesScope::Invocation(invoc_id) => Scope::MacroRules(
1728
- self.output_macro_rules_scopes
1729
- .get(&invoc_id)
1730
- .cloned()
1731
- .unwrap_or(self.invocation_parent_scopes[&invoc_id].macro_rules),
+ self.output_macro_rules_scopes.get(&invoc_id).cloned().unwrap_or_else(
+ || self.invocation_parent_scopes[&invoc_id].macro_rules,
+ ),
1732
),
1733
MacroRulesScope::Empty => Scope::Module(module),
1734
},
0 commit comments