Skip to content

Update rustc to latest nightly - #1534

Merged
W95Psp merged 18 commits into
cryspen:mainfrom
Nadrieril:update-rustc
Jul 21, 2025
Merged

Update rustc to latest nightly#1534
W95Psp merged 18 commits into
cryspen:mainfrom
Nadrieril:update-rustc

Conversation

@Nadrieril

Copy link
Copy Markdown
Collaborator

This updates rustc to the latest nightly. Required to get recent changes in a helper function that we need in charon to compute discriminant layouts.

You'll notice that traits now get a default Self: MetaSized bound. This is the consequence of the in-progress reqork of the Sized trait to add more granularity; see rust-lang/rust#137944.

@Nadrieril
Nadrieril requested a review from a team as a code owner July 1, 2025 11:23
@Nadrieril
Nadrieril requested a review from W95Psp July 1, 2025 11:23
@Nadrieril

Copy link
Copy Markdown
Collaborator Author

I'll let you handle the changelog and version upgrade.

@W95Psp W95Psp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks great!
I was not aware of this Sized thing, it's quite interesting.

Before merging I think I need to add a quick phases that throw those constraints away.
I hope I can take some time today to do that, but it's not clear.

@W95Psp

W95Psp commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

This should be fine now.
Let's see if ML-KEM breaks

@W95Psp
W95Psp enabled auto-merge July 3, 2025 11:18
@W95Psp

W95Psp commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Uh, we get a [E0391]: cycle detected when optimizing MIR for ... in our Rust engine.
Sounds like a bug of the compiler 🤔
We need to debug that before merging, and I don't have time any longer today.
Let's see on Monday.

@Nadrieril

Copy link
Copy Markdown
Collaborator Author

Huh weird, you don't use the MIR though do you? Didn't get any issues on the charon side.

@W95Psp

W95Psp commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

No, that's even weirder: it has nothing to do with the frontend!
It's just a bug of rustc while compiling our crate hax-rust-engine: compiling in release crash while compiling in debug works fine O_o

@W95Psp

W95Psp commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

I'll try to minimize

@Nadrieril

Copy link
Copy Markdown
Collaborator Author

oh wow, what cursed thing have you done x)

@Nadrieril Nadrieril mentioned this pull request Jul 3, 2025
@W95Psp

W95Psp commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Ah, someone got the same bug and minimized: rust-lang/rust#143534.
There's a PR (rust-lang/rust#143551) and it is in the merge queue!

When that PR is merged into rust, we can update the pin of rustc and finally merge that PR.

@Nadrieril

Copy link
Copy Markdown
Collaborator Author

rust-lang/rust#143551 has been merged, I've moved the nightly pin forward!

@W95Psp

W95Psp commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

Thank you so much, let's merge!

@W95Psp

W95Psp commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

The bug was not entirely fixed, see rust-lang/rust#143700.
Now it's fixed again, I'm updating rustc, let's see

@W95Psp

W95Psp commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

@Nadrieril is actually taking care of the update! Thanks @Nadrieril 😃

Charon uses its own fork of hax for the time being.
@W95Psp
W95Psp added this pull request to the merge queue Jul 21, 2025
@W95Psp
W95Psp removed this pull request from the merge queue due to a manual request Jul 21, 2025
@W95Psp

W95Psp commented Jul 21, 2025

Copy link
Copy Markdown
Contributor

Waiting for #1558

@W95Psp
W95Psp added this pull request to the merge queue Jul 21, 2025
Merged via the queue into cryspen:main with commit 2d4727e Jul 21, 2025
17 checks passed
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

Successfully merging this pull request may close these issues.

2 participants