chore(deps): Update Rust Stable to v1.93 (#6231)

* style: Make clippy happy

* chore(deps): Update Rust Stable to v1.93

---------

Co-authored-by: Ed Page <eopage@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2026-01-23 17:18:55 +00:00
committed by GitHub
parent b8be10b57a
commit e2d2d25094
12 changed files with 81 additions and 59 deletions

View File

@@ -10,3 +10,4 @@ disallowed-methods = [
{ path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" },
{ path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" },
]
doc-valid-idents = ["PowerShell", ".."]

View File

@@ -167,7 +167,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.92" # STABLE
toolchain: "1.93" # STABLE
- uses: Swatinem/rust-cache@v2
- name: UI Tests
run: make test-ui-${{ matrix.features }}
@@ -210,7 +210,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.92" # STABLE
toolchain: "1.93" # STABLE
- uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
@@ -225,7 +225,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.92" # STABLE
toolchain: "1.93" # STABLE
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
@@ -239,7 +239,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.92" # STABLE
toolchain: "1.93" # STABLE
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Lint (ultra-minimal)

View File

@@ -10,7 +10,7 @@ ifneq (${TOOLCHAIN_TARGET},)
ARGS+=--target ${TOOLCHAIN_TARGET}
endif
STABLE?=1.92
STABLE?=1.93
_FEATURES = minimal default wasm full debug release
_FEATURES_minimal = --no-default-features --features "std"

View File

@@ -618,6 +618,7 @@ impl Command {
/// println!("{}", m.get_flag("bar"));
/// }
/// ```
#[allow(clippy::test_attr_in_doctest)]
pub fn debug_assert(mut self) {
self.build();
}

View File

@@ -117,10 +117,7 @@ pub fn complete(
}
}
Err(std::io::Error::new(
std::io::ErrorKind::Other,
"no completion generated",
))
Err(std::io::Error::other("no completion generated"))
}
#[derive(Debug, PartialEq, Eq, Clone)]

View File

@@ -274,10 +274,7 @@ impl<'s, F: Fn() -> clap::Command> CompleteEnv<'s, F> {
let _ = write!(&mut seed, "{prefix}`{name}`");
seed
});
std::io::Error::new(
std::io::ErrorKind::Other,
format!("unknown shell `{name}`, expected one of {shells}"),
)
std::io::Error::other(format!("unknown shell `{name}`, expected one of {shells}"))
})?;
Ok(shell)
}

View File

@@ -101,10 +101,11 @@ fi
}
/// Type of completion attempted that caused a completion function to be called
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
#[derive(Default, Copy, Clone, Debug, PartialEq, Eq)]
#[non_exhaustive]
enum CompType {
/// Normal completion
#[default]
Normal,
/// List completions after successive tabs
Successive,
@@ -131,12 +132,6 @@ impl FromStr for CompType {
}
}
impl Default for CompType {
fn default() -> Self {
Self::Normal
}
}
/// Elvish completion adapter
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct Elvish;
@@ -488,7 +483,7 @@ mod tests {
&mut buf,
)
.expect("write_registration failed");
return String::from_utf8(buf).expect("Invalid UTF-8");
String::from_utf8(buf).expect("Invalid UTF-8")
};
let script = get_fish_registration("completer");

View File

@@ -8,7 +8,7 @@
#![cfg(feature = "unstable-derive-ui-tests")]
#[cfg(feature = "derive")]
#[rustversion::attr(not(stable(1.92)), ignore)] // STABLE
#[rustversion::attr(not(stable(1.93)), ignore)] // STABLE
#[test]
fn ui() {
let t = trybuild::TestCases::new();

View File

@@ -1,7 +1,11 @@
error[E0277]: the trait bound `bool: ValueEnum` is not satisfied
--> tests/derive_ui/bool_value_enum.rs:6:30
|
6 | #[arg(short, value_enum, default_value_t)]
| ^^^^^^^^^^^^^^^ the trait `ValueEnum` is not implemented for `bool`
|
= help: the trait `ValueEnum` is implemented for `ColorChoice`
6 | #[arg(short, value_enum, default_value_t)]
| ^^^^^^^^^^^^^^^ the trait `ValueEnum` is not implemented for `bool`
|
help: the trait `ValueEnum` is implemented for `ColorChoice`
--> clap_builder/src/util/color.rs
|
| impl ValueEnum for ColorChoice {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@@ -1,14 +1,19 @@
error[E0277]: the trait bound `SubCmd: clap::Args` is not satisfied
--> tests/derive_ui/enum_variant_not_args.rs:3:9
|
3 | Sub(SubCmd),
| ^^^^^^ unsatisfied trait bound
|
3 | Sub(SubCmd),
| ^^^^^^ unsatisfied trait bound
|
help: the trait `clap::Args` is not implemented for `SubCmd`
--> tests/derive_ui/enum_variant_not_args.rs:7:1
|
7 | enum SubCmd {}
| ^^^^^^^^^^^
= help: the following other types implement trait `clap::Args`:
()
Box<T>
--> tests/derive_ui/enum_variant_not_args.rs:7:1
|
7 | enum SubCmd {}
| ^^^^^^^^^^^
help: the following other types implement trait `clap::Args`
--> clap_builder/src/derive.rs
|
| impl<T: Args> Args for Box<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Box<T>`
...
| impl Args for () {
| ^^^^^^^^^^^^^^^^ `()`

View File

@@ -1,15 +1,25 @@
error[E0277]: the trait bound `SubCmd: clap::Args` is not satisfied
--> tests/derive_ui/flatten_enum_in_struct.rs:4:10
|
4 | sub: SubCmd,
| ^^^^^^ unsatisfied trait bound
|
4 | sub: SubCmd,
| ^^^^^^ unsatisfied trait bound
|
help: the trait `clap::Args` is not implemented for `SubCmd`
--> tests/derive_ui/flatten_enum_in_struct.rs:8:1
|
8 | enum SubCmd {}
| ^^^^^^^^^^^
= help: the following other types implement trait `clap::Args`:
()
Box<T>
Opt
--> tests/derive_ui/flatten_enum_in_struct.rs:8:1
|
8 | enum SubCmd {}
| ^^^^^^^^^^^
help: the following other types implement trait `clap::Args`
--> tests/derive_ui/flatten_enum_in_struct.rs:1:10
|
1 | #[derive(clap::Parser)]
| ^^^^^^^^^^^^ `Opt`
|
::: clap_builder/src/derive.rs
|
| impl<T: Args> Args for Box<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Box<T>`
...
| impl Args for () {
| ^^^^^^^^^^^^^^^^ `()`
= note: this error originates in the derive macro `clap::Parser` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@@ -1,16 +1,28 @@
error[E0277]: the trait bound `SubCmd: Subcommand` is not satisfied
--> tests/derive_ui/flatten_struct_in_enum.rs:4:9
|
4 | Sub(SubCmd),
| ^^^^^^ unsatisfied trait bound
|
4 | Sub(SubCmd),
| ^^^^^^ unsatisfied trait bound
|
help: the trait `Subcommand` is not implemented for `SubCmd`
--> tests/derive_ui/flatten_struct_in_enum.rs:8:1
|
8 | struct SubCmd {}
| ^^^^^^^^^^^^^
= help: the following other types implement trait `Subcommand`:
()
Box<T>
Infallible
Opt
--> tests/derive_ui/flatten_struct_in_enum.rs:8:1
|
8 | struct SubCmd {}
| ^^^^^^^^^^^^^
help: the following other types implement trait `Subcommand`
--> tests/derive_ui/flatten_struct_in_enum.rs:1:10
|
1 | #[derive(clap::Parser)]
| ^^^^^^^^^^^^ `Opt`
|
::: clap_builder/src/derive.rs
|
| impl<T: Subcommand> Subcommand for Box<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Box<T>`
...
| impl Subcommand for () {
| ^^^^^^^^^^^^^^^^^^^^^^ `()`
...
| impl Subcommand for Infallible {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Infallible`
= note: this error originates in the derive macro `clap::Parser` (in Nightly builds, run with -Z macro-backtrace for more info)