fix(cargo): raise MSRV to 1.88 to match let-chain usage#1647
Conversation
The workspace declares rust-version = "1.85", but the code uses
let-chains (`if let … && …`) — stabilized in Rust 1.88 — in
revision_history.rs, notes_push.rs, and approvals.rs. Building on
1.85–1.87 fails deep in compilation with E0658, so the declared
floor was a misleading contract.
Raise the floor to the honest minimum. Cargo now rejects older
toolchains up front ("requires rustc 1.88") instead of failing
mid-build. Prebuilt wheels are unaffected — no rustc is involved.
Raising the floor unlocks two clippy suggestions previously gated
below 1.85, applied here so the bump lands clippy-clean: collapsing
nested `if let { if … }` into let-chains (clippy::collapsible_if),
and `OsStr::display()` (stable since 1.87) instead of `{:?}` on the
editor path in `stack note` (clippy::unnecessary_debug_formatting).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: Ic897620d05dc0fc54e101f161b1a4b9ca2ea22be
Merge Protections🟢 All 5 merge protections satisfied — ready to merge. Show 5 satisfied protections🟢 🤖 Continuous Integration
🟢 👀 Review Requirements
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 Reviews
🟢 📕 PR description
|
|
This pull request is part of a Mergify stack:
|
There was a problem hiding this comment.
Pull request overview
This pull request updates the workspace MSRV to match Rust language features now used across the codebase (notably if/while let-chains), ensuring older toolchains fail fast via Cargo’s rust-version check rather than during compilation.
Changes:
- Bump workspace
rust-versionfrom 1.85 to 1.88. - Refactor multiple nested
if let { if ... }patterns into let-chains for clippy cleanliness and readability. - Improve
stack noteeditor error output by usingOsStr::display()instead of debug formatting.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Raises workspace MSRV to 1.88 and documents the rationale. |
| crates/mergify-stack/src/stack_context.rs | Converts env-var override logic to a let-chain. |
| crates/mergify-stack/src/rebase_todo.rs | Converts optional exec injection check to a let-chain. |
| crates/mergify-stack/src/progress.rs | Collapses detail-highlighting conditions into a let-chain. |
| crates/mergify-stack/src/git.rs | Collapses merge-base fork-point fallback check into a let-chain. |
| crates/mergify-stack/src/commands/note.rs | Uses display() for editor path in error message. |
| crates/mergify-core/src/auth.rs | Collapses gh auth token fallback check into a let-chain. |
| crates/mergify-ci/src/scopes_detect/outputs.rs | Uses let-chains to combine stdin take + write failure handling. |
| crates/mergify-ci/src/scopes_detect/mod.rs | Uses let-chains for optional debug file listing. |
| crates/mergify-ci/src/junit_process/junit.rs | Collapses nested testcase mutation + guard checks into let-chains. |
| crates/mergify-ci/src/junit_process/command.rs | Collapses silent-failure detection condition into a let-chain. |
| crates/mergify-ci/src/git_refs.rs | Collapses several nested event-structure checks into let-chains. |
| crates/mergify-ci/src/detector.rs | Collapses GHA PR-head-SHA detection into a let-chain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 11 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
The workspace declares rust-version = "1.85", but the code uses
let-chains (
if let … && …) — stabilized in Rust 1.88 — inrevision_history.rs, notes_push.rs, and approvals.rs. Building on
1.85–1.87 fails deep in compilation with E0658, so the declared
floor was a misleading contract.
Raise the floor to the honest minimum. Cargo now rejects older
toolchains up front ("requires rustc 1.88") instead of failing
mid-build. Prebuilt wheels are unaffected — no rustc is involved.
Raising the floor unlocks two clippy suggestions previously gated
below 1.85, applied here so the bump lands clippy-clean: collapsing
nested
if let { if … }into let-chains (clippy::collapsible_if),and
OsStr::display()(stable since 1.87) instead of{:?}on theeditor path in
stack note(clippy::unnecessary_debug_formatting).Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com