aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-15 16:18:19 +0100
committerAleksey Kladov <[email protected]>2020-07-15 16:18:19 +0100
commit6b9c72567363edcff5f4e703646b7246fdf5c671 (patch)
treef3b2cc18538eb70dfe1b7ccca20873b5ea11ea4e /crates/ra_hir/src
parent0908318171b78254f72ab3dc3bc6385f8e00ffd8 (diff)
Cap macro expansion depth for IDE features
closes #4453
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/source_analyzer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs
index d76345525..ecb54f653 100644
--- a/crates/ra_hir/src/source_analyzer.rs
+++ b/crates/ra_hir/src/source_analyzer.rs
@@ -352,7 +352,7 @@ impl SourceAnalyzer {
352 let macro_call_id = macro_call.as_call_id(db.upcast(), krate, |path| { 352 let macro_call_id = macro_call.as_call_id(db.upcast(), krate, |path| {
353 self.resolver.resolve_path_as_macro(db.upcast(), &path) 353 self.resolver.resolve_path_as_macro(db.upcast(), &path)
354 })?; 354 })?;
355 Some(macro_call_id.as_file()) 355 Some(macro_call_id.as_file()).filter(|it| it.expansion_level(db.upcast()) < 64)
356 } 356 }
357 357
358 pub(crate) fn resolve_variant( 358 pub(crate) fn resolve_variant(