Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
| -rw-r--r-- | crates/hir_def/src/nameres/collector.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs index dc75dc4d91..7f7213f4c3 100644 --- a/crates/hir_def/src/nameres/collector.rs +++ b/crates/hir_def/src/nameres/collector.rs @@ -271,6 +271,17 @@ impl DefCollector<'_> { None => continue, }; + if *attr_name == hir_expand::name![recursion_limit] { + if let Some(input) = &attr.input { + if let AttrInput::Literal(limit) = &**input { + if let Ok(limit) = limit.parse() { + self.def_map.recursion_limit = Some(limit); + } + } + } + continue; + } + let attr_is_register_like = *attr_name == hir_expand::name![register_attr] || *attr_name == hir_expand::name![register_tool]; if !attr_is_register_like { |