We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75aa6cf commit 1c1ff41Copy full SHA for 1c1ff41
tests/test/misc.rs
@@ -847,3 +847,34 @@ fn recursive_hang() {
847
}
848
849
850
+
851
+#[test]
852
+fn coinductive_wrapper() {
853
+ test! {
854
+ program {
855
+ #[coinductive]
856
+ trait Foo {}
857
+ struct Wrapper<T> {}
858
859
+ impl<T> Foo for Wrapper<Wrapper<T>>
860
+ where
861
+ Wrapper<T>: Foo
862
+ {}
863
+ }
864
865
+ goal {
866
+ exists<T> {
867
868
869
+ } yields[SolverChoice::slg_default()] {
870
+ // FIXME: wrong??
871
+ expect![["Unique; for<?U0> { substitution [?0 := Wrapper<^0.0>] }"]]
872
873
874
+ /*
875
+ FIXME: overflows stack
876
+ yields[SolverChoice::recursive_default()] {
877
+ expect![[r#"Ambiguous; no inference guidance"#]]
878
879
+ */
880
+}
0 commit comments