diff --git a/clap_derive/src/parse.rs b/clap_derive/src/parse.rs index 45e24d08..109b0eec 100644 --- a/clap_derive/src/parse.rs +++ b/clap_derive/src/parse.rs @@ -161,12 +161,6 @@ impl Parse for ClapAttr { "external_subcommand" => Ok(ExternalSubcommand(name)), "verbatim_doc_comment" => Ok(VerbatimDocComment(name)), - "default_value" => { - abort!(name, - "`#[clap(default_value)` attribute (without a value) has been replaced by `#[clap(default_value_t)]`."; - help = "Change the attribute to `#[clap(default_value_t)]`"; - ) - } "default_value_t" => Ok(DefaultValueT(name, None)), "default_value_os_t" => Ok(DefaultValueOsT(name, None)), "about" => (Ok(About(name))), diff --git a/tests/derive_ui/default_value_wo_value_removed.rs b/tests/derive_ui/default_value_wo_value_removed.rs deleted file mode 100644 index 6cd5b1d1..00000000 --- a/tests/derive_ui/default_value_wo_value_removed.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 Guillaume Pinot (@TeXitoi) -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use clap::Parser; - -#[derive(Parser, Debug)] -#[clap(name = "basic")] -struct Opt { - #[clap(default_value)] - value: i32, -} - -fn main() { - let opt = Opt::parse(); - println!("{:?}", opt); -} diff --git a/tests/derive_ui/default_value_wo_value_removed.stderr b/tests/derive_ui/default_value_wo_value_removed.stderr deleted file mode 100644 index 826afb06..00000000 --- a/tests/derive_ui/default_value_wo_value_removed.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: `#[clap(default_value)` attribute (without a value) has been replaced by `#[clap(default_value_t)]`. - - = help: Change the attribute to `#[clap(default_value_t)]` - - --> tests/derive_ui/default_value_wo_value_removed.rs:14:12 - | -14 | #[clap(default_value)] - | ^^^^^^^^^^^^^