diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index d6fecc01..04928db2 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -230,7 +230,7 @@ pub(crate) fn gen_augment( let next_display_order = item.next_display_order(); let flatten_group_assert = if matches!(**ty, Ty::Option) { quote_spanned! { kind.span()=> - <#inner_type as clap::Args>::group_id().expect("cannot `#[flatten]` an `Option` with `#[group(skip)]"); + <#inner_type as clap::Args>::group_id().expect("cannot `#[flatten]` an `Option` with `#[group(skip)]`"); } } else { quote! {} diff --git a/tests/derive/flatten.rs b/tests/derive/flatten.rs index 95ad43e2..6a1414e6 100644 --- a/tests/derive/flatten.rs +++ b/tests/derive/flatten.rs @@ -257,7 +257,7 @@ fn docstrings_ordering_with_multiple_clap_partial() { } #[test] -#[should_panic = "cannot `#[flatten]` an `Option` with `#[group(skip)]"] +#[should_panic = "cannot `#[flatten]` an `Option` with `#[group(skip)]`"] fn flatten_skipped_group() { #[derive(clap::Parser, Debug)] struct Cli {