fix(derive): Reduce compiler error noise

It looks like CI hasn't been running on this and we've introduced some
problems.  It looks like we had an off-by-one error in the check for
MSRV for deciding to run ui tests.
This commit is contained in:
Ed Page 2021-07-29 15:35:12 -05:00 committed by Pavan Kumar Sunkara
parent 758e5f337f
commit 52d3942ba6
6 changed files with 6 additions and 63 deletions

View file

@ -52,6 +52,9 @@ pub fn subcommand(name: &Ident) {
fn augment_subcommands_for_update(_app: clap::App<'_>) -> clap::App<'_> {
unimplemented!()
}
fn has_subcommand(name: &str) -> bool {
unimplemented!()
}
}
});
}
@ -77,6 +80,9 @@ pub fn arg_enum(name: &Ident) {
fn from_str(_input: &str, _case_insensitive: bool) -> Result<Self, String> {
unimplemented!()
}
fn as_arg(&self) -> Option<&'static str> {
unimplemented!()
}
}
})
}

View file

@ -5,12 +5,3 @@ error: `#[derive(ArgEnum)]` only supports enums
| ^^^^^^^
|
= note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0046]: not all trait items implemented, missing: `as_arg`
--> $DIR/arg_enum_on_struct.rs:3:10
|
3 | #[derive(ArgEnum, Debug)]
| ^^^^^^^ missing `as_arg` in implementation
|
= note: this error originates in the derive macro `ArgEnum` (in Nightly builds, run with -Z macro-backtrace for more info)
= help: implement the missing item: `fn as_arg(&self) -> Option<&'static str> { todo!() }`

View file

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

View file

@ -16,30 +16,3 @@ error: The enum variant marked with `external_attribute` must be a single-typed
18 | / #[clap(external_subcommand)]
19 | | Other { a: String },
| |_______________________^
error[E0046]: not all trait items implemented, missing: `has_subcommand`
--> $DIR/external_subcommand_wrong_type.rs:4:10
|
4 | #[derive(Clap, Debug)]
| ^^^^ missing `has_subcommand` in implementation
|
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`
error[E0046]: not all trait items implemented, missing: `has_subcommand`
--> $DIR/external_subcommand_wrong_type.rs:10:10
|
10 | #[derive(Clap, Debug)]
| ^^^^ missing `has_subcommand` in implementation
|
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`
error[E0046]: not all trait items implemented, missing: `has_subcommand`
--> $DIR/external_subcommand_wrong_type.rs:16:10
|
16 | #[derive(Clap, Debug)]
| ^^^^ missing `has_subcommand` in implementation
|
= note: this error originates in the derive macro `Clap` (in Nightly builds, run with -Z macro-backtrace for more info)
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`

View file

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

View file

@ -5,12 +5,3 @@ error: `#[derive(Subcommand)]` only supports enums
| ^^^^^^^^^^
|
= note: this error originates in the derive macro `Subcommand` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0046]: not all trait items implemented, missing: `has_subcommand`
--> $DIR/subcommand_on_struct.rs:3:10
|
3 | #[derive(Subcommand, Debug)]
| ^^^^^^^^^^ missing `has_subcommand` in implementation
|
= note: this error originates in the derive macro `Subcommand` (in Nightly builds, run with -Z macro-backtrace for more info)
= help: implement the missing item: `fn has_subcommand(_: &str) -> bool { todo!() }`