Skip to content

Commit 241d183

Browse files
epagepksunkara
authored andcommitted
Bump MSRV to 1.54.0
- This makes it so `doc` compiles on stable Fixes #2618
1 parent 6ea223b commit 241d183

15 files changed

+87
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
rust: [1.46.0, stable, beta]
24+
rust: [1.54.0, stable, beta]
2525
os: [windows-latest, macos-latest, ubuntu-latest]
2626
target:
2727
- i686-pc-windows-msvc
@@ -169,7 +169,7 @@ jobs:
169169
- name: Install rust
170170
uses: actions-rs/toolchain@v1
171171
with:
172-
toolchain: 1.46.0
172+
toolchain: 1.54.0
173173
target: ${{ matrix.target }}
174174
override: true
175175
- name: Checkout

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TODO: `cargo`, `std` features
88
## v3.0.0-rc.0
99

1010
#### Minimum Required Rust
11-
* As of this release, `clap` requires `rustc 1.46.0` or greater.
11+
* As of this release, `clap` requires `rustc 1.54.0` or greater.
1212

1313
#### BREAKING CHANGES
1414

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ The following is a list of the minimum required version of Rust to compile `clap
555555

556556
| clap | MSRV |
557557
| :----: | :----: |
558-
| >=3.0 | 1.46.0 |
558+
| >=3.0 | 1.54.0 |
559559
| >=2.21 | 1.24.0 |
560560
| >=2.2 | 1.12.0 |
561561
| >=2.1 | 1.6.0 |

clap_derive/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ proc-macro = true
3131
bench = false
3232

3333
[dependencies]
34-
syn = { version = "1.0.69", features = ["full"] }
34+
syn = { version = "1.0.74", features = ["full"] }
3535
quote = "1.0.9"
36-
proc-macro2 = "1.0.26"
36+
proc-macro2 = "1.0.28"
3737
heck = "0.3.0"
3838
proc-macro-error = "1"
3939

clap_derive/tests/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
66
// option. This file may not be copied, modified, or distributed
77

8-
#[rustversion::attr(any(not(stable), before(1.45), since(1.46)), ignore)]
8+
#[rustversion::attr(any(not(stable), before(1.54), since(1.55)), ignore)]
99
#[test]
1010
fn ui() {
1111
let t = trybuild::TestCases::new();

clap_derive/tests/ui/arg_enum_on_struct.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,13 @@ error: `#[derive(ArgEnum)]` only supports enums
44
3 | #[derive(ArgEnum, Debug)]
55
| ^^^^^^^
66
|
7-
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
7+
= note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
8+
9+
error[E0046]: not all trait items implemented, missing: `as_arg`
10+
--> $DIR/arg_enum_on_struct.rs:3:10
11+
|
12+
3 | #[derive(ArgEnum, Debug)]
13+
| ^^^^^^^ missing `as_arg` in implementation
14+
|
15+
= note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
16+
= help: implement the missing item: `fn as_arg(&self) -> Option<&'static str> { todo!() }`

clap_derive/tests/ui/enum_flatten.stderr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@ error: `flatten` is usable only with single-typed tuple variants
44
14 | / #[clap(flatten)]
55
15 | | Variant1,
66
| |____________^
7+
8+
error[E0046]: not all trait items implemented, missing: `has_subcommand`
9+
--> $DIR/enum_flatten.rs:11:10
10+
|
11+
11 | #[derive(Clap, Debug)]
12+
| ^^^^ missing `has_subcommand` in implementation
13+
|
14+
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
15+
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`

clap_derive/tests/ui/enum_variant_not_args.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ error[E0277]: the trait bound `SubCmd: clap::Args` is not satisfied
55
| ^^^^^^ the trait `clap::Args` is not implemented for `SubCmd`
66
|
77
= note: required by `augment_args`
8+
9+
error[E0277]: the trait bound `SubCmd: clap::Args` is not satisfied
10+
--> $DIR/enum_variant_not_args.rs:3:9
11+
|
12+
3 | Sub(SubCmd),
13+
| ^^^^^^ the trait `clap::Args` is not implemented for `SubCmd`
14+
|
15+
= note: required by `augment_args_for_update`

clap_derive/tests/ui/external_subcommand_wrong_type.stderr

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,30 @@ error: The enum variant marked with `external_attribute` must be a single-typed
1616
18 | / #[clap(external_subcommand)]
1717
19 | | Other { a: String },
1818
| |_______________________^
19+
20+
error[E0046]: not all trait items implemented, missing: `has_subcommand`
21+
--> $DIR/external_subcommand_wrong_type.rs:4:10
22+
|
23+
4 | #[derive(Clap, Debug)]
24+
| ^^^^ missing `has_subcommand` in implementation
25+
|
26+
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
27+
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`
28+
29+
error[E0046]: not all trait items implemented, missing: `has_subcommand`
30+
--> $DIR/external_subcommand_wrong_type.rs:10:10
31+
|
32+
10 | #[derive(Clap, Debug)]
33+
| ^^^^ missing `has_subcommand` in implementation
34+
|
35+
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
36+
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`
37+
38+
error[E0046]: not all trait items implemented, missing: `has_subcommand`
39+
--> $DIR/external_subcommand_wrong_type.rs:16:10
40+
|
41+
16 | #[derive(Clap, Debug)]
42+
| ^^^^ missing `has_subcommand` in implementation
43+
|
44+
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
45+
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`

clap_derive/tests/ui/multiple_external_subcommand.stderr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ error: Only one variant can be marked with `external_subcommand`, this is the se
33
|
44
14 | #[clap(external_subcommand)]
55
| ^^^^^^^^^^^^^^^^^^^
6+
7+
error[E0046]: not all trait items implemented, missing: `has_subcommand`
8+
--> $DIR/multiple_external_subcommand.rs:9:10
9+
|
10+
9 | #[derive(Clap, Debug)]
11+
| ^^^^ missing `has_subcommand` in implementation
12+
|
13+
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
14+
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`

0 commit comments

Comments
 (0)