Auto merge of #78528 - jonas-schievink:rollup-e70g9zk, r=jonas-schievink
Rollup of 11 pull requests
Successful merges:
- #75078 (Improve documentation for slice strip_* functions)
- #76138 (Explain fully qualified syntax for `Rc` and `Arc`)
- #78244 (Dogfood {exclusive,half-open} ranges in compiler (nfc))
- #78422 (Do not ICE on invalid input)
- #78423 (rustc_span: improve bounds checks in byte_pos_to_line_and_col)
- #78431 (Prefer new associated numeric consts in float error messages)
- #78462 (Use unwrapDIPtr because the Scope may be null.)
- #78493 (Update cargo)
- #78499 (Prevent String::retain from creating non-utf8 strings when abusing panic)
- #78505 (Update Clippy - temporary_cstring_as_ptr deprecation)
- #78527 (Fix some more typos)
Failed merges:
r? `@ghost`
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs
index b12e516..902ee5f 100644
--- a/compiler/rustc_resolve/src/lib.rs
+++ b/compiler/rustc_resolve/src/lib.rs
@@ -1725,10 +1725,9 @@
Scope::MacroRules(binding.parent_macro_rules_scope)
}
MacroRulesScope::Invocation(invoc_id) => Scope::MacroRules(
- self.output_macro_rules_scopes
- .get(&invoc_id)
- .cloned()
- .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,
+ ),
),
MacroRulesScope::Empty => Scope::Module(module),
},