Incorporate charon changes to the frontend#1765
Merged
W95Psp merged 69 commits intocryspen:mainfrom Nov 18, 2025
Merged
Conversation
Co-authored-by: Lucas Franceschino <lucas@franceschino.fr>
fix order problem
Contributor
|
Thanks, I'm looking into it :) |
There's no other use for that function
Since we're using `def_id.rs` for the names via an `include!`, we can't use the `sinto_todo!` macro. Implementing MacroKinds is straightforward, thus I did so instead of just expanding the `sinto_todo!` macro.
Even with a `cfg(feature = "rustc")` guarding the function, rustc rejects the code because of the `if let` guard.
Wrongly, the F* backend assumes tuples of size 1 are equivalent to the underlying type, e.g. `(T,)` reduces to `T`. While assuming that about tuples, a projection `tuple_of_size_1.0` (in Rust) will result in a projection in F* as well: `tuple_of_size_1._1`. Since `tuple_of_size_1` is typed `T` and not `Tuple1 T` in F*, this is ill-typed. This commit doesn't change the wrong translation of `(T,)` as `T`, but fixes the latter translation. This commit fixes the THIR importer, which inserted 0 as tuple length in projectors. This commit also makes the F* backend skip field projections on tuples of size one. This is a quickfix; the F* backend in the OCaml engine being legacy, we don't want to maintain it further.
W95Psp
approved these changes
Nov 18, 2025
Contributor
|
Let's see if cloudflare is back |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merges in the changes I did to the frontend for the purposes of Charon in the last couple of months. I have not propagated the changes beyond what I needed in charon so this doesn't build as it is. The most impactful is likely to be the update to the rustc version.