Frontend crash: ImplExprPredNotFound on bounds on opaque types
Reproducer:
fn uints() -> impl Iterator<Item = u64> {
vec![0u64].into_iter()
}
fn main() {
let mut hello = uints();
hello.next();
}
Open this code snippet in the playground
Crashes with:
warning[E9999]: Could not find a clause for `Binder { value: <impl std::iter::Iterator<Item = u64> as std::iter::Iterator>, bound_vars: [] }` in the item parameters
--> src/lib.rs:5:1
|
5 | fn main() {
| ^^^^^^^^^
Solution
We could use param_env_reveal_all_normalized, but that would tear down the opaque type abstraction.
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
We need to discuss that, I'm not sure this is still an bug.
Ah, thanks for investigating.
We could use param_env_reveal_all_normalized, but that would tear down the opaque type abstraction.
I am personally in favor of that
Yeah, maybe that's the best thing to do, let's try it.