Skip to content

ci: bump rust-toolchain to 1.95.0 and apply clippy --fix#313

Merged
estesp merged 1 commit intocontainerd:masterfrom
shvbsle:ci-fix
May 2, 2026
Merged

ci: bump rust-toolchain to 1.95.0 and apply clippy --fix#313
estesp merged 1 commit intocontainerd:masterfrom
shvbsle:ci-fix

Conversation

@shvbsle
Copy link
Copy Markdown
Contributor

@shvbsle shvbsle commented Apr 20, 2026

Why

CI is currently red for every PR: cargo 1.81 (pinned in rust-toolchain.toml) can no longer resolve the checked-in Cargo.lock. Transitive deps such as home v0.5.12 now require edition2024 and rustc >= 1.88, neither available on 1.81. Every matrix leg (Check, Build, deny) fails at cargo metadata before it can do anything useful.

What

  1. Bump rust-toolchain.toml to 1.95.0 (current stable).
  2. Apply cargo clippy --fix suggestions that newer clippy surfaces under -D warnings. All mechanical:
    • io::Error::new(ErrorKind::Other, ...) -> io::Error::other(...)
    • .map_or(false, ...) -> .is_some_and(...)
    • .ok_or_else(|| lit) -> .ok_or(lit)
    • Unnecessary explicit lifetimes (foo<'a> -> foo<'_>)
    • Redundant .into_iter() on an IntoIterator argument
    • A couple of match Some/None -> return None reductions to ? / if-let-guard
  3. Add a narrow #![allow(clippy::zombie_processes)] to tests/run-examples.rs. The lint is a false positive; wait_with_output is called on every cleanup path, clippy just cannot see through the control flow.

No behavior change.

Verified locally

make check-all, make, make -C compiler, make -C ttrpc-codegen, make -C example build-examples all pass.

Note

Advertised MSRV in Cargo.toml (rust-version = "1.70") is unchanged. That's a promise to crate consumers and is independent of the toolchain the repo uses to build itself.

@shvbsle shvbsle changed the title chore: bump up rustc to 1.88 chore: bump up rustc to 1.95 Apr 20, 2026
The current 1.81.0 pin can no longer resolve the checked-in Cargo.lock:
transitive dependencies (home v0.5.12 among others) now require
edition2024 and rustc >= 1.88, neither of which 1.81 supports.

1.95.0 is current stable at time of writing, and successfully resolves
and compiles the full workspace (crate, compiler, codegen, examples).

Newer clippy then flags a handful of stylistic issues that trip
`-D warnings` in `make check-all`:

- io::Error::new(ErrorKind::Other, ...) -> io::Error::other(...)
- .map_or(false, ...) -> .is_some_and(...)
- unnecessary explicit lifetimes (foo<'a> -> foo<'_>)
- .ok_or_else(|| lit) -> .ok_or(lit)
- redundant .into_iter() on an IntoIterator argument
- a few match-one-pattern reductions to `?` / if-let-guard

These are all applied via `cargo clippy --fix` and then `cargo fmt` and
reviewed; no behavior change. The one manually added line is a
`#![allow(clippy::zombie_processes)]` at the top of tests/run-examples.rs
where the lint is a false positive (the branching cleanup does wait on
each spawned child, clippy just can't see it through the control flow).

Locally verified: `make check-all`, `make`, `make -C compiler`,
`make -C ttrpc-codegen`, `make -C example build-examples` all pass.

Signed-off-by: Shiv Bhosale <shvbsle@amazon.com>
@shvbsle shvbsle changed the title chore: bump up rustc to 1.95 ci: bump rust-toolchain to 1.95.0 and apply clippy --fix Apr 20, 2026
@shvbsle shvbsle marked this pull request as ready for review April 20, 2026 19:07
@shvbsle
Copy link
Copy Markdown
Contributor Author

shvbsle commented Apr 22, 2026

@wllenyj @Tim-Zhang can I get a review for this PR?

@estesp estesp merged commit 5e2b506 into containerd:master May 2, 2026
14 checks passed
@shvbsle shvbsle deleted the ci-fix branch May 2, 2026 16:57
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.

4 participants