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

FStar backend usize literals support #598

Closed
kaspar030 opened this issue Apr 11, 2024 · 3 comments
Closed

FStar backend usize literals support #598

kaspar030 opened this issue Apr 11, 2024 · 3 comments

Comments

@kaspar030
Copy link

We're hitting this:

error[HAX0001]: (FStar backend) something is not implemented yet.
                usize literals (fail if pattern maching, otherwise TODO)
   --> src/riot-rs-runqueue/src/runqueue.rs:143:17
    |
143 |                 0 => i.is_none(),
    |                 ^
@karthikbhargavan
Copy link
Contributor

karthikbhargavan commented Apr 11, 2024

This is a known limitation. The issue is that we do not know the size of usize on the target platform.
So, it is better to cast the usize into u8or u16 or whatever in the pattern match:

match (x as u8) {.
  0 => ...
} ```

@W95Psp
Copy link
Collaborator

W95Psp commented Apr 11, 2024

I'm closing that issue in favor of #464, and PR #602 changes the error to mention both Karthik's workaround and issue #464.

@kaspar030
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants