diff --git a/clap_derive/src/derives/args.rs b/clap_derive/src/derives/args.rs index 8a9272afe93..83598f56477 100644 --- a/clap_derive/src/derives/args.rs +++ b/clap_derive/src/derives/args.rs @@ -703,7 +703,7 @@ fn gen_parsers( Ty::Other => { quote_spanned! { ty.span()=> #arg_matches.#get_one(#id) - .ok_or_else(|| clap::Error::raw(clap::error::ErrorKind::MissingRequiredArgument, format!("The following required argument was not provided: {}", #id)))? + .ok_or_else(|| clap::Error::raw(clap::error::ErrorKind::MissingRequiredArgument, concat!("The following required argument was not provided: ", #id)))? } } };