diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-15 16:19:07 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-15 16:19:07 +0100 |
commit | e30d39d502e485648116d8b608236487e5ebe3df (patch) | |
tree | 07d8579a85e7fb5eb7875f6e0962dd70bb15f559 /crates/ra_hir | |
parent | 2a01fe7d99376053b97aba9105dc7d9cf0c0641d (diff) | |
parent | 6b9c72567363edcff5f4e703646b7246fdf5c671 (diff) |
Merge #5396
5396: Cap macro expansion depth for IDE features r=matklad a=matklad
closes #4453
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/source_analyzer.rs | 2 |
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( |