mirror of
https://github.com/clap-rs/clap.git
synced 2026-01-25 05:36:19 +00:00
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:
@@ -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", ".."]
|
||||
|
||||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -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)
|
||||
|
||||
2
Makefile
2
Makefile
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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)]
|
||||
|
||||
5
clap_complete/src/env/mod.rs
vendored
5
clap_complete/src/env/mod.rs
vendored
@@ -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)
|
||||
}
|
||||
|
||||
11
clap_complete/src/env/shells.rs
vendored
11
clap_complete/src/env/shells.rs
vendored
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -4,4 +4,8 @@ error[E0277]: the trait bound `bool: ValueEnum` is not satisfied
|
||||
6 | #[arg(short, value_enum, default_value_t)]
|
||||
| ^^^^^^^^^^^^^^^ the trait `ValueEnum` is not implemented for `bool`
|
||||
|
|
||||
= help: the trait `ValueEnum` is implemented for `ColorChoice`
|
||||
help: the trait `ValueEnum` is implemented for `ColorChoice`
|
||||
--> clap_builder/src/util/color.rs
|
||||
|
|
||||
| impl ValueEnum for ColorChoice {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -9,6 +9,11 @@ help: the trait `clap::Args` is not implemented for `SubCmd`
|
||||
|
|
||||
7 | enum SubCmd {}
|
||||
| ^^^^^^^^^^^
|
||||
= help: the following other types implement trait `clap::Args`:
|
||||
()
|
||||
Box<T>
|
||||
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 () {
|
||||
| ^^^^^^^^^^^^^^^^ `()`
|
||||
|
||||
@@ -9,7 +9,17 @@ help: the trait `clap::Args` is not implemented for `SubCmd`
|
||||
|
|
||||
8 | enum SubCmd {}
|
||||
| ^^^^^^^^^^^
|
||||
= help: the following other types implement trait `clap::Args`:
|
||||
()
|
||||
Box<T>
|
||||
Opt
|
||||
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)
|
||||
|
||||
@@ -9,8 +9,20 @@ help: the trait `Subcommand` is not implemented for `SubCmd`
|
||||
|
|
||||
8 | struct SubCmd {}
|
||||
| ^^^^^^^^^^^^^
|
||||
= help: the following other types implement trait `Subcommand`:
|
||||
()
|
||||
Box<T>
|
||||
Infallible
|
||||
Opt
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user