Skip to content

Commit 3ca1066

Browse files
Merge pull request #19004 from teoxoy/patch-1
increase `AUTODEREF_RECURSION_LIMIT` to 20
2 parents fa272ed + 2eef052 commit 3ca1066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/rust-analyzer/crates/hir-ty/src/autoderef.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717
TraitEnvironment, Ty, TyBuilder, TyKind,
1818
};
1919

20-
static AUTODEREF_RECURSION_LIMIT: Limit = Limit::new(10);
20+
static AUTODEREF_RECURSION_LIMIT: Limit = Limit::new(20);
2121

2222
#[derive(Debug)]
2323
pub(crate) enum AutoderefKind {
@@ -49,7 +49,7 @@ pub fn autoderef(
4949
// If the deref chain contains a cycle (e.g. `A` derefs to `B` and `B` derefs to `A`), we
5050
// would revisit some already visited types. Stop here to avoid duplication.
5151
//
52-
// XXX: The recursion limit for `Autoderef` is currently 10, so `Vec::contains()` shouldn't
52+
// XXX: The recursion limit for `Autoderef` is currently 20, so `Vec::contains()` shouldn't
5353
// be too expensive. Replace this duplicate check with `FxHashSet` if it proves to be more
5454
// performant.
5555
if v.contains(&resolved) {

0 commit comments

Comments
 (0)