Skip to content

chore(msrv): stablize 'let' statements#149

Open
billf wants to merge 2 commits intooppiliappan:masterfrom
billf:chore-msrv-stablize-let
Open

chore(msrv): stablize 'let' statements#149
billf wants to merge 2 commits intooppiliappan:masterfrom
billf:chore-msrv-stablize-let

Conversation

@billf
Copy link
Copy Markdown

@billf billf commented Oct 22, 2025

edition 2024 existed in rust versions previous to 1.88, but
'let' chaining syntax had not yet settled down.

used https://foresterre.github.io/cargo-msrv

This feature was stabilized in 1.88.0 but on edition 2024 only.

c.f. rust-lang/rust#53667

@billf
Copy link
Copy Markdown
Author

billf commented Oct 22, 2025

firing off a release to address #139 would also be nice

billf added 2 commits October 22, 2025 12:41
edition 2024 existed in rust versions previous to 1.88, but
'let' chaining syntax had not yet settled down.

used <https://foresterre.github.io/cargo-msrv>

> This feature was stabilized in 1.88.0 but on edition 2024 only.
c.f. rust-lang/rust#53667
@billf billf force-pushed the chore-msrv-stablize-let branch from de3c134 to 85ef8af Compare October 22, 2025 19:42
@billf billf marked this pull request as ready for review October 22, 2025 19:42
Comment thread Cargo.toml
[workspace.package]
edition = "2024"
license = "MIT"
rust-version = "1.88.0"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't know that I want to accept the overhead of having to keep this value up to date. Is it worth the hassle?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the benefit is "fail-faster".

when built using a version prior to 1.88, the use(1 2) of let chaining will cause compilation to fail.

alternatives:

  • README.md modification to say "anything but rust stable unsupported", "anything but building from nix unstable"
  • rust-toolchain.toml(same issue of overhead)
  • unwinding let chains (ugly. plus, maintainer must remember not to merge PRs that use them)
  • modiyfing the github workflow to build using a non-stable version (no good reason to do this)

in the time since this PR was submitted, the required version has gone from "most recent stable" to "a few revisions behind". over time, directionally, fewer users are now impacted...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I appreciate the effort, I do. But I don't see why do anything at all about this. We have a Nix powered dev shell. And even if some contributor does not use that, they won't take long figuring out that their toolchain version does not support some language feature that is ins use 🤷.

In related news, I have forked this https://github.com/molybdenumsoftware/statix.

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