diff options
| author | Chayim Refael Friedman <chayimfr@gmail.com> | 2025-09-30 15:18:42 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-30 15:18:42 +0000 | 
| commit | 9cb7d985e339ea232e4243354d1f0e85d2d01948 (patch) | |
| tree | 225901efb3bf513352d2468febbf643d5f77c7c2 /src | |
| parent | 8575ada259f00b1e888d361300a2c934d71a6687 (diff) | |
| parent | bf6f75f98ebb5304800d45e58d08ed8a5cc7c584 (diff) | |
| download | rust-9cb7d985e339ea232e4243354d1f0e85d2d01948.tar.gz rust-9cb7d985e339ea232e4243354d1f0e85d2d01948.zip | |
Merge pull request #20769 from ChayimFriedman2/ns-cleanup4
minor: 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.rs | 24 | 
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 + } + } +} +"#, + ); +} | 
