fix: make the declared 1.85 MSRV true — remove the one let-chain#1
Merged
Conversation
query.rs used a let-chain (`if x && let Some(..) = ..`), stable only since
Rust 1.88 — so builds on the declared rust-version = "1.85" failed with
E0658 ("`let` expressions in this position are unstable"). This was caught
downstream: yoagent's 1.86 MSRV CI job broke the moment it added
yoagent-state as a dependency and had to exclude the feature.
Rewritten as a plain nested if-let (identical semantics); a comment marks
why, so it isn't "simplified" back into a let-chain. No behavior change;
all 15 tests pass; clippy is unchanged (no collapsible_if fired).
With this released, downstream crates with MSRVs in the 1.85-1.87 range can
depend on yoagent-state again without carve-outs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
yuanhao
added a commit
to yologdev/yoagent
that referenced
this pull request
Jul 11, 2026
) yoagent-state 0.4.2 makes its declared 1.85 MSRV true (let-chain removed upstream in yologdev/yoagent-state#1), so the gasp feature can be MSRV- checked again. Floor bumped to 0.4.2 so a 1.86 toolchain can never resolve the broken 0.4.1. The stale docs caveat is removed. Downstream verified against 0.4.2 before this change: yoagent's 392 tests, yoyo-evolve's gasp-emit (compiles), yyds-harness (0.2.x range, unaffected). This PR's own MSRV job is the final verdict for the 1.86 + --all-features combination. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What
rust-version = "1.85"is currently inaccurate:src/query.rsuses a let-chain, which stabilized in Rust 1.88. On any toolchain in the declared range, the crate fails with:Cargo doesn't verify
rust-versionagainst the code, so this shipped silently in 0.4.x. It was caught downstream: yoagent's 1.86 MSRV CI job broke when it addedyoagent-statebehind its newgaspfeature (yologdev/yoagent#68) and had to exclude the feature from MSRV checking with a "fix upstream" note — this is that fix.The fix
The single let-chain (there's exactly one, grep-verified) rewritten as a plain nested
if/if let— identical semantics, valid since Rust 1.0. A comment marks the reason so it doesn't get "simplified" back.Verification
cargo test— 15/15 passcargo clippy --all-targets— unchanged vs main (2 pre-existing warnings elsewhere; nocollapsible_iffired on the rewrite)Follow-up (downstream)
Once this lands in a 0.4.2 release, yoagent can drop its MSRV carve-out and check
--all-features(includinggasp) on 1.86 again.🤖 Generated with Claude Code