Skip to content

update rust toolchain to 1.97.1#10847

Open
iliana wants to merge 2 commits into
mainfrom
iliana/1.97.1
Open

update rust toolchain to 1.97.1#10847
iliana wants to merge 2 commits into
mainfrom
iliana/1.97.1

Conversation

@iliana

@iliana iliana commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

The goal here is to pick up a optimization miscompilation fix, but be aware that -Csymbol-mangling-version=v0 is along for the ride too. I seem to remember some chatter in #oxide-rust that this is fine?

https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/
https://blog.rust-lang.org/2026/07/16/Rust-1.97.1/

The bulk of the churn here is https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting. I would normally have disabled the lint to avoid the churn but:

Detects format!-style macros (e.g. format!, println!, write!) where an argument is passed with an explicit & but the value is already a reference, resulting in a double reference (e.g. &&T).

The extra & is redundant and can make the code less clear. Format macros take references to the arguments internally, so passing &x when x is already a reference produces a double reference. The compiler is currently unable to optimize double references, which results in about 6% degradation per call.

This will almost certainly result in "semantic merge conflicts" shortly after this PR lands. I will ask people to be vigilant but there is no real guard rail so it will happen anyway.

Note there is a new warning:

warning: the following packages contain code that will be rejected by a future version of Rust: proc-macro-error2 v2.0.1
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

proc-macro-error2 is unmaintained and is brought in through tabled_derive. tabled has merged a change which removes the unmaintained dependency but this has not yet landed in a release.

@iliana
iliana requested a review from iximeow July 16, 2026 22:18

@iximeow iximeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

helios#263 notwithstanding, nice, yeah, maybe 1.97.1 is finally when there won't be miscompilations!

re. the lint: if you do want to disable the lint here I think that's fine, because I read the note as "lint for existing regressions", not "rustc stopped optimizing double references". and if anyone cares about the throughput of format!() .. I'm sorry for them ... but since the deed is done this sgtm

@iliana

iliana commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

maybe 1.97.1 is finally when there won't be miscompilations!

knocks on several wood pallets

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.

3 participants