Skip to content

Commit 2a126c7

Browse files
adamrkjackh726
authored andcommitted
include test for projection guidance
1 parent 59eab1a commit 2a126c7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test/projection.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,3 +1016,30 @@ fn issue_144_regression() {
10161016
}
10171017
}
10181018
}
1019+
1020+
#[test]
1021+
fn guidance_for_projection_on_flounder() {
1022+
test! {
1023+
program {
1024+
trait Iterator { type Item; }
1025+
#[non_enumerable]
1026+
trait Step {}
1027+
1028+
struct Range<T> {}
1029+
1030+
impl<T> Iterator for Range<T> where T: Step {
1031+
type Item = T;
1032+
}
1033+
}
1034+
1035+
goal {
1036+
exists<T> {
1037+
exists<U> {
1038+
<Range<T> as Iterator>::Item = U
1039+
}
1040+
}
1041+
} yields[SolverChoice::recursive()] {
1042+
"Ambiguous; definite substitution for<?U0> { [?0 := ^0.0, ?1 := ^0.0] }"
1043+
}
1044+
}
1045+
}

0 commit comments

Comments
 (0)