-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
C-chalk-solveIssues related to the chalk-solve crateIssues related to the chalk-solve crate
Description
#[test]
fn endless_loop() {
test! {
disable_coherence;
program {
trait FnOnce {
type Output;
}
struct MyClosure<F> {}
impl<T> FnOnce for MyClosure<fn() -> T> {
type Output = T;
}
}
goal {
exists<T> {
<MyClosure<fn() -> T> as FnOnce>::Output = T
}
} yields[SolverChoice::recursive_default()] {
"Unique; for<?U0> { substitution [?0 := ^0.0], lifetime constraints [] }"
}
}
}
This hangs forever in the recursive solver; in the SLG solver, it results in Ambiguous; no inference guidance
, which seems wrong as well? Replacing fn() -> T
by T
makes the test succeed (in both solvers).
lnicola
Metadata
Metadata
Assignees
Labels
C-chalk-solveIssues related to the chalk-solve crateIssues related to the chalk-solve crate