mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Don't guess macro expansion crate
This commit is contained in:
parent
d8a5d39c2d
commit
fac7b0e252
9 changed files with 89 additions and 62 deletions
|
@ -307,7 +307,8 @@ impl SourceAnalyzer {
|
|||
db: &dyn HirDatabase,
|
||||
macro_call: InFile<&ast::MacroCall>,
|
||||
) -> Option<HirFileId> {
|
||||
let macro_call_id = macro_call.as_call_id(db.upcast(), |path| {
|
||||
let krate = self.resolver.krate()?;
|
||||
let macro_call_id = macro_call.as_call_id(db.upcast(), krate, |path| {
|
||||
self.resolver.resolve_path_as_macro(db.upcast(), &path)
|
||||
})?;
|
||||
Some(macro_call_id.as_file())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue