Add regression test for another (long-standing) bug fixed by the new solver
This commit is contained in:
parent
8575ada259
commit
bf6f75f98e
1 changed files with 23 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue