Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend crash: ImplExprPredNotFound on bounds on opaque types #684

Closed
W95Psp opened this issue May 22, 2024 · 6 comments · Fixed by #1008
Closed

Frontend crash: ImplExprPredNotFound on bounds on opaque types #684

W95Psp opened this issue May 22, 2024 · 6 comments · Fixed by #1008
Labels
bug Something isn't working frontend Issue in the Rust to JSON translation

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented May 22, 2024

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.

@W95Psp W95Psp added bug Something isn't working frontend Issue in the Rust to JSON translation labels May 22, 2024
Copy link

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.

@github-actions github-actions bot added the stale label Aug 28, 2024
@W95Psp
Copy link
Collaborator Author

W95Psp commented Aug 28, 2024

We need to discuss that, I'm not sure this is still an bug.

@W95Psp W95Psp added needs-discussion Issue that requires a discussion to make their status clear needs-triage Mark an issue that needs triage: add label, add more contents and removed needs-triage Mark an issue that needs triage: add label, add more contents labels Aug 28, 2024
@github-actions github-actions bot removed the stale label Aug 29, 2024
@franziskuskiefer
Copy link
Member

Still seems to crash.

@W95Psp
Copy link
Collaborator Author

W95Psp commented Aug 29, 2024

Ah, thanks for investigating.

@W95Psp W95Psp removed the needs-discussion Issue that requires a discussion to make their status clear label Aug 29, 2024
@W95Psp W95Psp mentioned this issue Oct 2, 2024
4 tasks
@Nadrieril
Copy link
Collaborator

We could use param_env_reveal_all_normalized, but that would tear down the opaque type abstraction.

I am personally in favor of that

@W95Psp
Copy link
Collaborator Author

W95Psp commented Oct 2, 2024

Yeah, maybe that's the best thing to do, let's try it.

@Nadrieril Nadrieril changed the title Fronend crash: ImplExprPredNotFound on bounds on opaque types Frontend crash: ImplExprPredNotFound on bounds on opaque types Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Issue in the Rust to JSON translation
Projects
No open projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants