Skip to content

Commit

Permalink
Bump Rust toolchain channel from 1.79 to 1.80
Browse files Browse the repository at this point in the history
Upgrade the version of Rust and related tooling from 1.79.0 to 1.80.0,
which was recently released [1].

The `io_error_more` gate is still applicable (verified based on the
corresponding GitHub issue and running the tests with the related code
removed).

One new clippy lints from the "restriction" category ise enabled for
this project because I think it's a sensible restriction. Also, the new
`unexpected_cfgs` lint has been explicitly configured so that it
1) errors instead of warns and 2) does not trigger for the tarpaulin
config used by this project.

--
1. https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html
  • Loading branch information
ericcornelissen committed Jul 28, 2024
1 parent 6dbabe2 commit 5b206f5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ To be able to contribute you need the following tooling:

- [git] v2;
- [Just] v1;
- [Rust] and [Cargo] v1.79 (edition 2021) with [Clippy], [rustfmt] (see `rust-toolchain.toml`);
- [Rust] and [Cargo] v1.80 (edition 2021) with [Clippy], [rustfmt] (see `rust-toolchain.toml`);
- (Optional) [cargo-all-features] v1.7.0 or later;
- (Optional) [cargo-deny] v0.14.2 or later;
- (Optional) [cargo-mutants] v23.5.0 or later;
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ proptest = "1.5.0"
proptest-attr-macro = "1.0.0"
proptest-derive = "0.4.0"

[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(tarpaulin_include)'] }

[profile.release]
debug = false
debug-assertions = false
Expand Down
2 changes: 1 addition & 1 deletion Containerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT-0

FROM docker.io/rust:1.79.0-alpine3.19
FROM docker.io/rust:1.80.0-alpine3.19

RUN apk add --no-cache \
bash git just libressl-dev musl-dev perl
Expand Down
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ _profile_prepare:
--deny clippy::rc_buffer \
--deny clippy::rc_mutex \
--deny clippy::ref_patterns \
--deny clippy::renamed_function_params \
--deny clippy::string_lit_chars_any \
--deny clippy::unwrap_used \
\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ rm -fq file1 file2

## Build from Source

To build from source you need [Rust] and [Cargo], v1.79 or higher, installed on your system. Then
To build from source you need [Rust] and [Cargo], v1.80 or higher, installed on your system. Then
run the command:

```shell
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Check out rustup at: https://rust-lang.github.io/rustup/index.html

[toolchain]
channel = "1.79.0"
channel = "1.80.0"
components = [
"cargo",
"clippy",
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@ mod rm {
trace!("remove {entry}");

if entry.is_dir() && !fs::is_empty(&entry) {
// This case is handled explicitly because, as of Rust 1.79, the `io::ErrorKind` variant
// This case is handled explicitly because, as of Rust 1.80, the `io::ErrorKind` variant
// is still experimental (gate "io_error_more") and so would result in an unknown error.
// This implementation leaves a possibility for a TOCTOU issue, but this will be handled
// safely as `std::fs::remove_dir` doesn't remove non-empty directories.
Expand Down

0 comments on commit 5b206f5

Please sign in to comment.