This commit is contained in:
Lukas Wirth 2021-09-19 23:34:07 +02:00
parent 3987bf5d6f
commit 9c39363ada
9 changed files with 24 additions and 33 deletions

View file

@ -307,17 +307,12 @@ impl<'a> TyLoweringContext<'a> {
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(), macro_call.file_id, module_id));
(Some(expander), true)
} else {
if let Some(module_id) = self.resolver.module() {
*expander = Some(Expander::new(
self.db.upcast(),
macro_call.file_id,
module_id,
));
(Some(expander), true)
} else {
(None, false)
}
(None, false)
}
};
let ty = if let Some(mut expander) = expander {