mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Simplify
This commit is contained in:
parent
3987bf5d6f
commit
9c39363ada
9 changed files with 24 additions and 33 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue