diff options
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 + } + } +} +"#, + ); +} |
