Skip to content

Update rustc to latest nightly #1534

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Nadrieril
Copy link
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
Collaborator Author

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

Copy link
Collaborator

@W95Psp W95Psp left a comment

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
Copy link
Collaborator

W95Psp commented Jul 3, 2025

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

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

W95Psp commented Jul 3, 2025

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
Collaborator Author

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

@W95Psp
Copy link
Collaborator

W95Psp commented Jul 3, 2025

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
Copy link
Collaborator

W95Psp commented Jul 3, 2025

I'll try to minimize

@Nadrieril
Copy link
Collaborator Author

oh wow, what cursed thing have you done x)

@Nadrieril Nadrieril mentioned this pull request Jul 3, 2025
@W95Psp
Copy link
Collaborator

W95Psp commented Jul 7, 2025

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
Collaborator Author

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

@W95Psp
Copy link
Collaborator

W95Psp commented Jul 9, 2025

Thank you so much, let's merge!

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