Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions tests/test/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,30 +267,38 @@ fn inductive_canonical_cycle() {
program {
trait Trait<T, U> {}

trait IsNotU32 {}
impl IsNotU32 for i32 {}
impl IsNotU32 for i16 {}

impl<T, U> Trait<T, U> for ()
where
(): Trait<U, T>,
T: OtherTrait,
T: IsNotU32,
{}
impl<T> Trait<u32, T> for () {}
}

trait OtherTrait {}
impl OtherTrait for u32 {}
goal {
(): Trait<i32, u32>
} yields {
expect![["Unique"]]
}

goal {
(): Trait<u32, u32>
(): Trait<u32, i32>
} yields {
// FIXME: Should be unique
expect![["No possible solution"]]
expect![["Unique"]]
}

goal {
exists<T, U> {
(): Trait<T, U>
}
} yields {
// FIXME: Should be unique
expect![["No possible solution"]]
} yields[SolverChoice::slg(10, None)] {
expect![["Ambiguous; no inference guidance"]]
} yields[SolverChoice::recursive_default()] {
expect![["Ambiguous; no inference guidance"]]
}
}
}