mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Auto merge of #17394 - Veykril:recurse-fix, r=Veykril
fix: Fix `HirDisplay` stackoverflow for parameter Self defaults Fixes https://github.com/rust-lang/rust-analyzer/issues/10932
This commit is contained in:
commit
c07076b35c
2 changed files with 48 additions and 16 deletions
|
@ -709,4 +709,25 @@ fn main() {
|
|||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
// regression test for a stackoverflow in hir display code
|
||||
#[test]
|
||||
fn adjustment_hints_method_call_on_impl_trait_self() {
|
||||
check_with_config(
|
||||
InlayHintsConfig { adjustment_hints: AdjustmentHints::Always, ..DISABLED_CONFIG },
|
||||
r#"
|
||||
//- minicore: slice, coerce_unsized
|
||||
trait T<RHS = Self> {}
|
||||
|
||||
fn hello(it: &&[impl T]) {
|
||||
it.len();
|
||||
//^^(
|
||||
//^^&
|
||||
//^^*
|
||||
//^^*
|
||||
//^^)
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue