diff options
| author | Chayim Refael Friedman <chayimfr@gmail.com> | 2025-01-22 21:36:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-22 21:36:12 +0000 |
| commit | 3ca106683ea652a3e18b91f6452324a2d71fcdeb (patch) | |
| tree | 9491d21cc7106667e7ccf3c59e2f0328c7e5435c /src/tools/rust-analyzer | |
| parent | fa272edebbc769b71165a39dc95a585eb7a3e793 (diff) | |
| parent | 2eef052f04de27abf16e8acdd4f2fa9b144b8b00 (diff) | |
| download | rust-3ca106683ea652a3e18b91f6452324a2d71fcdeb.tar.gz rust-3ca106683ea652a3e18b91f6452324a2d71fcdeb.zip | |
Merge pull request #19004 from teoxoy/patch-1
increase `AUTODEREF_RECURSION_LIMIT` to 20
Diffstat (limited to 'src/tools/rust-analyzer')
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs b/src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs index 2b5342314a6..2c7076da11a 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs @@ -17,7 +17,7 @@ use crate::{ TraitEnvironment, Ty, TyBuilder, TyKind, }; -static AUTODEREF_RECURSION_LIMIT: Limit = Limit::new(10); +static AUTODEREF_RECURSION_LIMIT: Limit = Limit::new(20); #[derive(Debug)] pub(crate) enum AutoderefKind { @@ -49,7 +49,7 @@ pub fn autoderef( // If the deref chain contains a cycle (e.g. `A` derefs to `B` and `B` derefs to `A`), we // would revisit some already visited types. Stop here to avoid duplication. // - // XXX: The recursion limit for `Autoderef` is currently 10, so `Vec::contains()` shouldn't + // XXX: The recursion limit for `Autoderef` is currently 20, so `Vec::contains()` shouldn't // be too expensive. Replace this duplicate check with `FxHashSet` if it proves to be more // performant. if v.contains(&resolved) { |
