Skip to content

Commit 0b61823

Browse files
committed
[meta] update MSRV to Rust 1.81, switch lints from allow to expect
This caught a few outdated lints and a few that should have been `cfg(test)`.
1 parent 425aefd commit 0b61823

File tree

30 files changed

+62
-66
lines changed

30 files changed

+62
-66
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ jobs:
6464
# macos-14 for M1 runners
6565
- macos-14
6666
- windows-latest
67-
# 1.75 is the MSRV
68-
rust-version: ["1.75", stable]
67+
# 1.81 is the MSRV
68+
rust-version: ["1.81", stable]
6969
fail-fast: false
7070
steps:
7171
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ members = [
1111
]
1212

1313
[workspace.package]
14-
rust-version = "1.75"
14+
rust-version = "1.81"
1515
edition = "2021"
1616
license = "MIT OR Apache-2.0"
1717

cargo-nextest/src/cargo_cli.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ impl<'a> CargoCli<'a> {
228228
}
229229
}
230230

231-
#[allow(dead_code)]
232231
pub(crate) fn add_arg(&mut self, arg: &'a str) -> &mut Self {
233232
self.args.push(Cow::Borrowed(arg));
234233
self

cargo-nextest/src/dispatch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ struct TestBuildFilter {
602602
}
603603

604604
impl TestBuildFilter {
605-
#[allow(clippy::too_many_arguments)]
605+
#[expect(clippy::too_many_arguments)]
606606
fn compute_test_list<'g>(
607607
&self,
608608
ctx: &TestExecuteContext<'_>,
@@ -2000,7 +2000,7 @@ enum SetupSource {
20002000
}
20012001

20022002
impl SelfCommand {
2003-
#[allow(unused_variables)]
2003+
#[cfg_attr(not(feature = "self-update"), expect(unused_variables))]
20042004
fn exec(self, output: OutputOpts) -> Result<i32> {
20052005
let output = output.init();
20062006

cargo-nextest/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl ExpectedError {
336336
}
337337
}
338338

339-
#[allow(dead_code)]
339+
#[expect(dead_code)]
340340
pub(crate) fn experimental_feature_error(name: &'static str, var_name: &'static str) -> Self {
341341
Self::ExperimentalFeatureNotEnabled { name, var_name }
342342
}

integration-tests/tests/integration/fixtures.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl CargoNextestCli {
4848
}
4949
}
5050

51-
#[allow(dead_code)]
51+
#[expect(dead_code)]
5252
pub fn arg(&mut self, arg: impl Into<String>) -> &mut Self {
5353
self.args.push(arg.into());
5454
self
@@ -64,7 +64,7 @@ impl CargoNextestCli {
6464
self
6565
}
6666

67-
#[allow(dead_code)]
67+
#[expect(dead_code)]
6868
pub fn envs(
6969
&mut self,
7070
envs: impl IntoIterator<Item = (impl Into<OsString>, impl Into<OsString>)>,

integration-tests/tests/integration/temp_project.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ impl TempProject {
7979
})
8080
}
8181

82-
#[allow(dead_code)]
82+
#[expect(dead_code)]
8383
pub fn persist(&mut self) {
8484
if let Some(dir) = self.temp_dir.take() {
8585
_ = dir.into_path();
8686
}
8787
}
8888

89-
#[allow(dead_code)]
9089
pub fn temp_root(&self) -> &Utf8Path {
9190
&self.temp_root
9291
}
@@ -168,7 +167,7 @@ pub(crate) use windows::*;
168167

169168
#[derive(Clone, Copy, Debug, PartialEq)]
170169
#[must_use]
171-
#[allow(dead_code)]
170+
#[expect(dead_code)]
172171
pub(crate) enum UdsStatus {
173172
Created,
174173
NotCreated,

nextest-filtering/src/parsing.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ pub enum SetDef<S = SourceSpan> {
6161
}
6262

6363
impl SetDef {
64+
#[cfg(test)]
6465
fn drop_source_span(self) -> SetDef<()> {
6566
match self {
6667
Self::Package(matcher, _) => SetDef::Package(matcher, ()),
@@ -154,7 +155,7 @@ impl ParsedExpr {
154155
ParsedExpr::Set(SetDef::None)
155156
}
156157

157-
#[allow(unused)]
158+
#[cfg(test)]
158159
fn drop_source_span(self) -> ParsedExpr<()> {
159160
match self {
160161
Self::Not(op, expr) => ParsedExpr::Not(op, Box::new(expr.drop_source_span())),

nextest-filtering/src/proptest_helpers.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Copyright (c) The nextest Contributors
22
// SPDX-License-Identifier: MIT OR Apache-2.0
33

4-
// https://github.com/proptest-rs/proptest/pull/363, can be removed once that is in a released
5-
// version of proptest.
6-
#![allow(clippy::arc_with_non_send_sync)]
7-
84
use crate::{
95
parsing::{
106
AndOperator, DifferenceOperator, GenericGlob, NotOperator, OrOperator, ParsedExpr, SetDef,

nextest-filtering/tests/match.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// Copyright (c) The nextest Contributors
22
// SPDX-License-Identifier: MIT OR Apache-2.0
33

4-
// test_case causes clippy warnings with Rust 1.71.
5-
#![allow(clippy::items_after_test_module)]
6-
74
use guppy::{
85
graph::{cargo::BuildPlatform, PackageGraph},
96
PackageId,

0 commit comments

Comments
 (0)