From bf6f75f98ebb5304800d45e58d08ed8a5cc7c584 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Tue, 30 Sep 2025 18:07:27 +0300 Subject: [PATCH] Add regression test for another (long-standing) bug fixed by the new solver --- .../hir-ty/src/tests/regression/new_solver.rs | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression/new_solver.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression/new_solver.rs index c7711f31bf26..adc35cc9bc1c 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression/new_solver.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/regression/new_solver.rs @@ -1,6 +1,6 @@ use expect_test::expect; -use crate::tests::{check_infer, check_no_mismatches}; +use crate::tests::{check_infer, check_no_mismatches, check_types}; #[test] fn regression_20365() { @@ -450,3 +450,25 @@ fn main() { "#, ); } + +#[test] +fn double_into_iter() { + check_types( + r#" +//- minicore: iterator + +fn intoiter_issue(foo: A) +where + A: IntoIterator, + B: IntoIterator, +{ + for x in foo { + // ^ B + for m in x { + // ^ usize + } + } +} +"#, + ); +}