about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2025-09-30 18:07:27 +0300
committerChayim Refael Friedman <chayimfr@gmail.com>2025-09-30 18:07:27 +0300
commitbf6f75f98ebb5304800d45e58d08ed8a5cc7c584 (patch)
tree225901efb3bf513352d2468febbf643d5f77c7c2 /src
parent8575ada259f00b1e888d361300a2c934d71a6687 (diff)
downloadrust-bf6f75f98ebb5304800d45e58d08ed8a5cc7c584.tar.gz
rust-bf6f75f98ebb5304800d45e58d08ed8a5cc7c584.zip
Add regression test for another (long-standing) bug fixed by the new solver
Diffstat (limited to 'src')
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/tests/regression/new_solver.rs24
1 files changed, 23 insertions, 1 deletions
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 c7711f31bf2..adc35cc9bc1 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<A, B>(foo: A)
+where
+    A: IntoIterator<Item = B>,
+    B: IntoIterator<Item = usize>,
+{
+    for x in foo {
+    //  ^ B
+        for m in x {
+        //  ^ usize
+        }
+    }
+}
+"#,
+    );
+}