mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
hir_ty: cleanups and extend infinitely_recursive_macro_type test
This commit is contained in:
parent
6ed2fd233b
commit
f0507ab7c6
2 changed files with 14 additions and 8 deletions
|
@ -296,9 +296,11 @@ impl<'a> TyLoweringContext<'a> {
|
|||
}
|
||||
}
|
||||
TypeRef::Macro(macro_call) => {
|
||||
let (expander, recursion_start) = match self.expander.borrow_mut() {
|
||||
expander if expander.is_some() => (Some(expander), false),
|
||||
mut expander => {
|
||||
let (expander, recursion_start) = {
|
||||
let mut expander = self.expander.borrow_mut();
|
||||
if expander.is_some() {
|
||||
(Some(expander), false)
|
||||
} else {
|
||||
if let Some(module_id) = self.resolver.module() {
|
||||
*expander = Some(Expander::new(
|
||||
self.db.upcast(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue