diff --git a/Cargo.toml b/Cargo.toml index c4e91d70..c2846c16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,4 @@ structopt-derive = { path = "structopt-derive", version = "0.3.2" } [dev-dependencies] trybuild = "1.0.5" -version_check = "0.9" - -[workspace] +rustversion = "0.1" diff --git a/tests/macro-errors.rs b/tests/macro-errors.rs index ca663fec..95276b21 100644 --- a/tests/macro-errors.rs +++ b/tests/macro-errors.rs @@ -5,17 +5,9 @@ // , at your // option. This file may not be copied, modified, or distributed -extern crate version_check; -use version_check::Version; - +#[rustversion::attr(not(stable), ignore)] #[test] fn ui() { let t = trybuild::TestCases::new(); - let version = Version::read().unwrap(); - - if version.at_least("1.39.0") { - t.compile_fail("tests/ui-1.39_post/*.rs"); - } else { - t.compile_fail("tests/ui-pre_1.39/*.rs"); - } + t.compile_fail("tests/ui/*.rs"); } diff --git a/tests/ui-1.39_post/bool_default_value.stderr b/tests/ui-1.39_post/bool_default_value.stderr deleted file mode 100644 index a0f1b9b8..00000000 --- a/tests/ui-1.39_post/bool_default_value.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: default_value is meaningless for bool - --> $DIR/bool_default_value.rs:14:24 - | -14 | #[structopt(short, default_value = true)] - | ^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/bool_required.stderr b/tests/ui-1.39_post/bool_required.stderr deleted file mode 100644 index 4d5f59de..00000000 --- a/tests/ui-1.39_post/bool_required.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: required is meaningless for bool - --> $DIR/bool_required.rs:14:24 - | -14 | #[structopt(short, required = true)] - | ^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/flatten_and_doc.stderr b/tests/ui-1.39_post/flatten_and_doc.stderr deleted file mode 100644 index 1996ba01..00000000 --- a/tests/ui-1.39_post/flatten_and_doc.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: methods and doc comments are not allowed for flattened entry - --> $DIR/flatten_and_doc.rs:23:17 - | -23 | #[structopt(flatten)] - | ^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/flatten_and_methods.stderr b/tests/ui-1.39_post/flatten_and_methods.stderr deleted file mode 100644 index a83663e7..00000000 --- a/tests/ui-1.39_post/flatten_and_methods.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: methods and doc comments are not allowed for flattened entry - --> $DIR/flatten_and_methods.rs:22:24 - | -22 | #[structopt(short, flatten)] - | ^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/flatten_and_parse.stderr b/tests/ui-1.39_post/flatten_and_parse.stderr deleted file mode 100644 index 0e70492b..00000000 --- a/tests/ui-1.39_post/flatten_and_parse.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: parse attribute is not allowed for flattened entry - --> $DIR/flatten_and_parse.rs:22:26 - | -22 | #[structopt(flatten, parse(from_occurrences))] - | ^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/non_existent_attr.stderr b/tests/ui-1.39_post/non_existent_attr.stderr deleted file mode 100644 index 1784777d..00000000 --- a/tests/ui-1.39_post/non_existent_attr.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error[E0599]: no method named `non_existing_attribute` found for type `clap::args::arg::Arg<'_, '_>` in the current scope - --> $DIR/non_existent_attr.rs:14:24 - | -14 | #[structopt(short, non_existing_attribute = 1)] - | ^^^^^^^^^^^^^^^^^^^^^^ method not found in `clap::args::arg::Arg<'_, '_>` - -For more information about this error, try `rustc --explain E0599`. -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/opt_opt_nonpositional.stderr b/tests/ui-1.39_post/opt_opt_nonpositional.stderr deleted file mode 100644 index f3fe73ba..00000000 --- a/tests/ui-1.39_post/opt_opt_nonpositional.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: Option> type is meaningless for positional argument - --> $DIR/opt_opt_nonpositional.rs:14:8 - | -14 | n: Option>, - | ^^^^^^^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/opt_vec_nonpositional.stderr b/tests/ui-1.39_post/opt_vec_nonpositional.stderr deleted file mode 100644 index 3207fa77..00000000 --- a/tests/ui-1.39_post/opt_vec_nonpositional.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: Option> type is meaningless for positional argument - --> $DIR/opt_vec_nonpositional.rs:14:8 - | -14 | n: Option>, - | ^^^^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/option_default_value.stderr b/tests/ui-1.39_post/option_default_value.stderr deleted file mode 100644 index 42e02a58..00000000 --- a/tests/ui-1.39_post/option_default_value.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: default_value is meaningless for Option - --> $DIR/option_default_value.rs:14:24 - | -14 | #[structopt(short, default_value = 1)] - | ^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/option_required.stderr b/tests/ui-1.39_post/option_required.stderr deleted file mode 100644 index 5483c7f3..00000000 --- a/tests/ui-1.39_post/option_required.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: required is meaningless for Option - --> $DIR/option_required.rs:14:24 - | -14 | #[structopt(short, required = true)] - | ^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/parse_empty_try_from_os.stderr b/tests/ui-1.39_post/parse_empty_try_from_os.stderr deleted file mode 100644 index a8e81fa0..00000000 --- a/tests/ui-1.39_post/parse_empty_try_from_os.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: cannot omit parser function name with `try_from_os_str` - --> $DIR/parse_empty_try_from_os.rs:14:23 - | -14 | #[structopt(parse(try_from_os_str))] - | ^^^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/parse_function_is_not_path.stderr b/tests/ui-1.39_post/parse_function_is_not_path.stderr deleted file mode 100644 index 82969f70..00000000 --- a/tests/ui-1.39_post/parse_function_is_not_path.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: `parse` argument must be a function path - --> $DIR/parse_function_is_not_path.rs:14:34 - | -14 | #[structopt(parse(from_str = "2"))] - | ^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/parse_literal_spec.stderr b/tests/ui-1.39_post/parse_literal_spec.stderr deleted file mode 100644 index 1f8df94e..00000000 --- a/tests/ui-1.39_post/parse_literal_spec.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: parser specification must start with identifier - --> $DIR/parse_literal_spec.rs:14:23 - | -14 | #[structopt(parse("from_str"))] - | ^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/parse_not_zero_args.stderr b/tests/ui-1.39_post/parse_not_zero_args.stderr deleted file mode 100644 index 440c608b..00000000 --- a/tests/ui-1.39_post/parse_not_zero_args.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: parse must have exactly one argument - --> $DIR/parse_not_zero_args.rs:14:17 - | -14 | #[structopt(parse(from_str, from_str))] - | ^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/raw.stderr b/tests/ui-1.39_post/raw.stderr deleted file mode 100644 index 49e3d4c1..00000000 --- a/tests/ui-1.39_post/raw.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: `#[structopt(raw(...))` attributes are deprecated in structopt 0.3, only `raw(true)` and `raw(false)` are allowed - --> $DIR/raw.rs:13:17 - | -13 | #[structopt(raw(case_insensitive = "true"))] - | ^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/rename_all_wrong_casing.stderr b/tests/ui-1.39_post/rename_all_wrong_casing.stderr deleted file mode 100644 index f344ccc8..00000000 --- a/tests/ui-1.39_post/rename_all_wrong_casing.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: unsupported casing: `fail` - --> $DIR/rename_all_wrong_casing.rs:12:42 - | -12 | #[structopt(name = "basic", rename_all = "fail")] - | ^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/skip_flatten.stderr b/tests/ui-1.39_post/skip_flatten.stderr deleted file mode 100644 index 3d47bdde..00000000 --- a/tests/ui-1.39_post/skip_flatten.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: subcommand, flatten and skip cannot be used together - --> $DIR/skip_flatten.rs:17:23 - | -17 | #[structopt(skip, flatten)] - | ^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/skip_subcommand.stderr b/tests/ui-1.39_post/skip_subcommand.stderr deleted file mode 100644 index 1f72c172..00000000 --- a/tests/ui-1.39_post/skip_subcommand.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: subcommand, flatten and skip cannot be used together - --> $DIR/skip_subcommand.rs:17:29 - | -17 | #[structopt(subcommand, skip)] - | ^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/skip_with_other_options.stderr b/tests/ui-1.39_post/skip_with_other_options.stderr deleted file mode 100644 index c0bf8798..00000000 --- a/tests/ui-1.39_post/skip_with_other_options.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: methods are not allowed for skipped fields - --> $DIR/skip_with_other_options.rs:8:23 - | -8 | #[structopt(skip, long)] - | ^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/skip_without_default.stderr b/tests/ui-1.39_post/skip_without_default.stderr deleted file mode 100644 index 8dfbe0e9..00000000 --- a/tests/ui-1.39_post/skip_without_default.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error[E0277]: the trait bound `Kind: std::default::Default` is not satisfied - --> $DIR/skip_without_default.rs:22:17 - | -22 | #[structopt(skip)] - | ^^^^ the trait `std::default::Default` is not implemented for `Kind` - | - = note: required by `std::default::Default::default` - -For more information about this error, try `rustc --explain E0277`. -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/struct_flatten.stderr b/tests/ui-1.39_post/struct_flatten.stderr deleted file mode 100644 index c2665f8f..00000000 --- a/tests/ui-1.39_post/struct_flatten.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: flatten is only allowed on fields - --> $DIR/struct_flatten.rs:12:29 - | -12 | #[structopt(name = "basic", flatten)] - | ^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/struct_parse.stderr b/tests/ui-1.39_post/struct_parse.stderr deleted file mode 100644 index 3054a43e..00000000 --- a/tests/ui-1.39_post/struct_parse.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: parse attribute is only allowed on fields - --> $DIR/struct_parse.rs:12:29 - | -12 | #[structopt(name = "basic", parse(from_str))] - | ^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/struct_subcommand.stderr b/tests/ui-1.39_post/struct_subcommand.stderr deleted file mode 100644 index 94b2b956..00000000 --- a/tests/ui-1.39_post/struct_subcommand.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: subcommand is only allowed on fields - --> $DIR/struct_subcommand.rs:12:29 - | -12 | #[structopt(name = "basic", subcommand)] - | ^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/structopt_empty_attr.stderr b/tests/ui-1.39_post/structopt_empty_attr.stderr deleted file mode 100644 index 002d1199..00000000 --- a/tests/ui-1.39_post/structopt_empty_attr.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: expected parentheses after `structopt` - --> $DIR/structopt_empty_attr.rs:14:7 - | -14 | #[structopt] - | ^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/structopt_name_value_attr.stderr b/tests/ui-1.39_post/structopt_name_value_attr.stderr deleted file mode 100644 index 3da33619..00000000 --- a/tests/ui-1.39_post/structopt_name_value_attr.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: expected parentheses - --> $DIR/structopt_name_value_attr.rs:14:17 - | -14 | #[structopt = "short"] - | ^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/subcommand_and_flatten.stderr b/tests/ui-1.39_post/subcommand_and_flatten.stderr deleted file mode 100644 index 22e5f828..00000000 --- a/tests/ui-1.39_post/subcommand_and_flatten.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: subcommand, flatten and skip cannot be used together - --> $DIR/subcommand_and_flatten.rs:17:29 - | -17 | #[structopt(subcommand, flatten)] - | ^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/subcommand_and_methods.stderr b/tests/ui-1.39_post/subcommand_and_methods.stderr deleted file mode 100644 index 1e5a9ae5..00000000 --- a/tests/ui-1.39_post/subcommand_and_methods.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: methods in attributes are not allowed for subcommand - --> $DIR/subcommand_and_methods.rs:17:29 - | -17 | #[structopt(subcommand, long)] - | ^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/subcommand_and_parse.stderr b/tests/ui-1.39_post/subcommand_and_parse.stderr deleted file mode 100644 index 888d85bb..00000000 --- a/tests/ui-1.39_post/subcommand_and_parse.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: parse attribute is not allowed for subcommand - --> $DIR/subcommand_and_parse.rs:17:29 - | -17 | #[structopt(subcommand, parse(from_occurrences))] - | ^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/subcommand_opt_opt.stderr b/tests/ui-1.39_post/subcommand_opt_opt.stderr deleted file mode 100644 index 307fe03a..00000000 --- a/tests/ui-1.39_post/subcommand_opt_opt.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: Option> type is not allowed for subcommand - --> $DIR/subcommand_opt_opt.rs:18:10 - | -18 | cmd: Option>, - | ^^^^^^^^^^^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/subcommand_opt_vec.stderr b/tests/ui-1.39_post/subcommand_opt_vec.stderr deleted file mode 100644 index 3a03c1fe..00000000 --- a/tests/ui-1.39_post/subcommand_opt_vec.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: Option> type is not allowed for subcommand - --> $DIR/subcommand_opt_vec.rs:18:10 - | -18 | cmd: Option>, - | ^^^^^^^^^^^^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-1.39_post/tuple_struct.stderr b/tests/ui-1.39_post/tuple_struct.stderr deleted file mode 100644 index 401e06bf..00000000 --- a/tests/ui-1.39_post/tuple_struct.stderr +++ /dev/null @@ -1,7 +0,0 @@ -error: structopt only supports non-tuple structs and enums - --> $DIR/tuple_struct.rs:11:10 - | -11 | #[derive(StructOpt, Debug)] - | ^^^^^^^^^ - -error: could not compile `structopt-tests`. diff --git a/tests/ui-pre_1.39/bool_default_value.rs b/tests/ui-pre_1.39/bool_default_value.rs deleted file mode 100644 index 9bdb0c94..00000000 --- a/tests/ui-pre_1.39/bool_default_value.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, default_value = true)] - b: bool, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/bool_required.rs b/tests/ui-pre_1.39/bool_required.rs deleted file mode 100644 index 018223c2..00000000 --- a/tests/ui-pre_1.39/bool_required.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, required = true)] - b: bool, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/flatten_and_doc.rs b/tests/ui-pre_1.39/flatten_and_doc.rs deleted file mode 100644 index 2dc154d7..00000000 --- a/tests/ui-pre_1.39/flatten_and_doc.rs +++ /dev/null @@ -1,30 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -struct DaemonOpts { - #[structopt(short)] - user: String, - #[structopt(short)] - group: String, -} - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - /// Opts. - #[structopt(flatten)] - opts: DaemonOpts, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/flatten_and_methods.rs b/tests/ui-pre_1.39/flatten_and_methods.rs deleted file mode 100644 index ff1af2ee..00000000 --- a/tests/ui-pre_1.39/flatten_and_methods.rs +++ /dev/null @@ -1,29 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -struct DaemonOpts { - #[structopt(short)] - user: String, - #[structopt(short)] - group: String, -} - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, flatten)] - opts: DaemonOpts, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/flatten_and_parse.rs b/tests/ui-pre_1.39/flatten_and_parse.rs deleted file mode 100644 index 3317272b..00000000 --- a/tests/ui-pre_1.39/flatten_and_parse.rs +++ /dev/null @@ -1,29 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -struct DaemonOpts { - #[structopt(short)] - user: String, - #[structopt(short)] - group: String, -} - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(flatten, parse(from_occurrences))] - opts: DaemonOpts, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/non_existent_attr.rs b/tests/ui-pre_1.39/non_existent_attr.rs deleted file mode 100644 index 96daf45c..00000000 --- a/tests/ui-pre_1.39/non_existent_attr.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, non_existing_attribute = 1)] - debug: bool, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/opt_opt_nonpositional.rs b/tests/ui-pre_1.39/opt_opt_nonpositional.rs deleted file mode 100644 index 2a08105b..00000000 --- a/tests/ui-pre_1.39/opt_opt_nonpositional.rs +++ /dev/null @@ -1,20 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - n: Option>, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/opt_vec_nonpositional.rs b/tests/ui-pre_1.39/opt_vec_nonpositional.rs deleted file mode 100644 index 0f6f0784..00000000 --- a/tests/ui-pre_1.39/opt_vec_nonpositional.rs +++ /dev/null @@ -1,20 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - n: Option>, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/option_default_value.rs b/tests/ui-pre_1.39/option_default_value.rs deleted file mode 100644 index a86bc0ea..00000000 --- a/tests/ui-pre_1.39/option_default_value.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, default_value = 1)] - n: Option, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/option_required.rs b/tests/ui-pre_1.39/option_required.rs deleted file mode 100644 index d91afbf2..00000000 --- a/tests/ui-pre_1.39/option_required.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(short, required = true)] - n: Option, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/parse_empty_try_from_os.rs b/tests/ui-pre_1.39/parse_empty_try_from_os.rs deleted file mode 100644 index acfef0b2..00000000 --- a/tests/ui-pre_1.39/parse_empty_try_from_os.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(parse(try_from_os_str))] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/parse_function_is_not_path.rs b/tests/ui-pre_1.39/parse_function_is_not_path.rs deleted file mode 100644 index 5eebc57f..00000000 --- a/tests/ui-pre_1.39/parse_function_is_not_path.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(parse(from_str = "2"))] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/parse_literal_spec.rs b/tests/ui-pre_1.39/parse_literal_spec.rs deleted file mode 100644 index b6f125a1..00000000 --- a/tests/ui-pre_1.39/parse_literal_spec.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(parse("from_str"))] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/parse_not_zero_args.rs b/tests/ui-pre_1.39/parse_not_zero_args.rs deleted file mode 100644 index 87291789..00000000 --- a/tests/ui-pre_1.39/parse_not_zero_args.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt(parse(from_str, from_str))] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/raw.rs b/tests/ui-pre_1.39/raw.rs deleted file mode 100644 index a149a2bd..00000000 --- a/tests/ui-pre_1.39/raw.rs +++ /dev/null @@ -1,20 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -struct Opt { - #[structopt(raw(case_insensitive = "true"))] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/rename_all_wrong_casing.rs b/tests/ui-pre_1.39/rename_all_wrong_casing.rs deleted file mode 100644 index 4dabe14b..00000000 --- a/tests/ui-pre_1.39/rename_all_wrong_casing.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic", rename_all = "fail")] -struct Opt { - #[structopt(short)] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/skip_flatten.rs b/tests/ui-pre_1.39/skip_flatten.rs deleted file mode 100644 index 8668ec2a..00000000 --- a/tests/ui-pre_1.39/skip_flatten.rs +++ /dev/null @@ -1,42 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(skip, flatten)] - cmd: Command, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -impl Default for Command { - fn default() -> Self { - Command::Pound { acorns: 0 } - } -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/skip_subcommand.rs b/tests/ui-pre_1.39/skip_subcommand.rs deleted file mode 100644 index 5d21426b..00000000 --- a/tests/ui-pre_1.39/skip_subcommand.rs +++ /dev/null @@ -1,42 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand, skip)] - cmd: Command, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -impl Default for Command { - fn default() -> Self { - Command::Pound { acorns: 0 } - } -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/skip_with_other_options.rs b/tests/ui-pre_1.39/skip_with_other_options.rs deleted file mode 100644 index 73c53420..00000000 --- a/tests/ui-pre_1.39/skip_with_other_options.rs +++ /dev/null @@ -1,15 +0,0 @@ -use structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "test")] -pub struct Opt { - #[structopt(long)] - a: u32, - #[structopt(skip, long)] - b: u32, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/skip_without_default.rs b/tests/ui-pre_1.39/skip_without_default.rs deleted file mode 100644 index bc47511f..00000000 --- a/tests/ui-pre_1.39/skip_without_default.rs +++ /dev/null @@ -1,29 +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 structopt::StructOpt; - -#[derive(Debug)] -enum Kind { - A, - B, -} - -#[derive(StructOpt, Debug)] -#[structopt(name = "test")] -pub struct Opt { - #[structopt(short)] - number: u32, - #[structopt(skip)] - k: Kind, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/struct_flatten.rs b/tests/ui-pre_1.39/struct_flatten.rs deleted file mode 100644 index 2b205f16..00000000 --- a/tests/ui-pre_1.39/struct_flatten.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic", flatten)] -struct Opt { - #[structopt(short)] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/struct_parse.rs b/tests/ui-pre_1.39/struct_parse.rs deleted file mode 100644 index e428b23f..00000000 --- a/tests/ui-pre_1.39/struct_parse.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic", parse(from_str))] -struct Opt { - #[structopt(short)] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/struct_subcommand.rs b/tests/ui-pre_1.39/struct_subcommand.rs deleted file mode 100644 index ac0b1457..00000000 --- a/tests/ui-pre_1.39/struct_subcommand.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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic", subcommand)] -struct Opt { - #[structopt(short)] - s: String, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/structopt_empty_attr.rs b/tests/ui-pre_1.39/structopt_empty_attr.rs deleted file mode 100644 index a7fc0b99..00000000 --- a/tests/ui-pre_1.39/structopt_empty_attr.rs +++ /dev/null @@ -1,22 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt] - debug: bool, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} - diff --git a/tests/ui-pre_1.39/structopt_name_value_attr.rs b/tests/ui-pre_1.39/structopt_name_value_attr.rs deleted file mode 100644 index 3d9388f2..00000000 --- a/tests/ui-pre_1.39/structopt_name_value_attr.rs +++ /dev/null @@ -1,22 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt { - #[structopt = "short"] - debug: bool, -} - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} - diff --git a/tests/ui-pre_1.39/subcommand_and_flatten.rs b/tests/ui-pre_1.39/subcommand_and_flatten.rs deleted file mode 100644 index 742ee6d0..00000000 --- a/tests/ui-pre_1.39/subcommand_and_flatten.rs +++ /dev/null @@ -1,36 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand, flatten)] - cmd: Command, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/subcommand_and_methods.rs b/tests/ui-pre_1.39/subcommand_and_methods.rs deleted file mode 100644 index 890f10c5..00000000 --- a/tests/ui-pre_1.39/subcommand_and_methods.rs +++ /dev/null @@ -1,36 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand, long)] - cmd: Command, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/subcommand_and_parse.rs b/tests/ui-pre_1.39/subcommand_and_parse.rs deleted file mode 100644 index f24e4bc7..00000000 --- a/tests/ui-pre_1.39/subcommand_and_parse.rs +++ /dev/null @@ -1,36 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand, parse(from_occurrences))] - cmd: Command, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/subcommand_opt_opt.rs b/tests/ui-pre_1.39/subcommand_opt_opt.rs deleted file mode 100644 index 1dd84e54..00000000 --- a/tests/ui-pre_1.39/subcommand_opt_opt.rs +++ /dev/null @@ -1,36 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand)] - cmd: Option>, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/subcommand_opt_vec.rs b/tests/ui-pre_1.39/subcommand_opt_vec.rs deleted file mode 100644 index 17bffbf1..00000000 --- a/tests/ui-pre_1.39/subcommand_opt_vec.rs +++ /dev/null @@ -1,36 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "make-cookie")] -struct MakeCookie { - #[structopt(short)] - s: String, - - #[structopt(subcommand)] - cmd: Option>, -} - -#[derive(StructOpt, Debug)] -enum Command { - #[structopt(name = "pound")] - /// Pound acorns into flour for cookie dough. - Pound { acorns: u32 }, - - Sparkle { - #[structopt(short)] - color: String, - }, -} - -fn main() { - let opt = MakeCookie::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-pre_1.39/tuple_struct.rs b/tests/ui-pre_1.39/tuple_struct.rs deleted file mode 100644 index af9b1d5c..00000000 --- a/tests/ui-pre_1.39/tuple_struct.rs +++ /dev/null @@ -1,18 +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 structopt::StructOpt; - -#[derive(StructOpt, Debug)] -#[structopt(name = "basic")] -struct Opt(u32); - -fn main() { - let opt = Opt::from_args(); - println!("{:?}", opt); -} diff --git a/tests/ui-1.39_post/bool_default_value.rs b/tests/ui/bool_default_value.rs similarity index 100% rename from tests/ui-1.39_post/bool_default_value.rs rename to tests/ui/bool_default_value.rs diff --git a/tests/ui-pre_1.39/bool_default_value.stderr b/tests/ui/bool_default_value.stderr similarity index 100% rename from tests/ui-pre_1.39/bool_default_value.stderr rename to tests/ui/bool_default_value.stderr diff --git a/tests/ui-1.39_post/bool_required.rs b/tests/ui/bool_required.rs similarity index 100% rename from tests/ui-1.39_post/bool_required.rs rename to tests/ui/bool_required.rs diff --git a/tests/ui-pre_1.39/bool_required.stderr b/tests/ui/bool_required.stderr similarity index 100% rename from tests/ui-pre_1.39/bool_required.stderr rename to tests/ui/bool_required.stderr diff --git a/tests/ui-1.39_post/flatten_and_doc.rs b/tests/ui/flatten_and_doc.rs similarity index 100% rename from tests/ui-1.39_post/flatten_and_doc.rs rename to tests/ui/flatten_and_doc.rs diff --git a/tests/ui-pre_1.39/flatten_and_doc.stderr b/tests/ui/flatten_and_doc.stderr similarity index 100% rename from tests/ui-pre_1.39/flatten_and_doc.stderr rename to tests/ui/flatten_and_doc.stderr diff --git a/tests/ui-1.39_post/flatten_and_methods.rs b/tests/ui/flatten_and_methods.rs similarity index 100% rename from tests/ui-1.39_post/flatten_and_methods.rs rename to tests/ui/flatten_and_methods.rs diff --git a/tests/ui-pre_1.39/flatten_and_methods.stderr b/tests/ui/flatten_and_methods.stderr similarity index 100% rename from tests/ui-pre_1.39/flatten_and_methods.stderr rename to tests/ui/flatten_and_methods.stderr diff --git a/tests/ui-1.39_post/flatten_and_parse.rs b/tests/ui/flatten_and_parse.rs similarity index 100% rename from tests/ui-1.39_post/flatten_and_parse.rs rename to tests/ui/flatten_and_parse.rs diff --git a/tests/ui-pre_1.39/flatten_and_parse.stderr b/tests/ui/flatten_and_parse.stderr similarity index 100% rename from tests/ui-pre_1.39/flatten_and_parse.stderr rename to tests/ui/flatten_and_parse.stderr diff --git a/tests/ui-1.39_post/non_existent_attr.rs b/tests/ui/non_existent_attr.rs similarity index 100% rename from tests/ui-1.39_post/non_existent_attr.rs rename to tests/ui/non_existent_attr.rs diff --git a/tests/ui-pre_1.39/non_existent_attr.stderr b/tests/ui/non_existent_attr.stderr similarity index 79% rename from tests/ui-pre_1.39/non_existent_attr.stderr rename to tests/ui/non_existent_attr.stderr index 6592154b..7c6bea91 100644 --- a/tests/ui-pre_1.39/non_existent_attr.stderr +++ b/tests/ui/non_existent_attr.stderr @@ -3,5 +3,3 @@ error[E0599]: no method named `non_existing_attribute` found for type `clap::arg | 14 | #[structopt(short, non_existing_attribute = 1)] | ^^^^^^^^^^^^^^^^^^^^^^ - -For more information about this error, try `rustc --explain E0599`. diff --git a/tests/ui-1.39_post/opt_opt_nonpositional.rs b/tests/ui/opt_opt_nonpositional.rs similarity index 100% rename from tests/ui-1.39_post/opt_opt_nonpositional.rs rename to tests/ui/opt_opt_nonpositional.rs diff --git a/tests/ui-pre_1.39/opt_opt_nonpositional.stderr b/tests/ui/opt_opt_nonpositional.stderr similarity index 100% rename from tests/ui-pre_1.39/opt_opt_nonpositional.stderr rename to tests/ui/opt_opt_nonpositional.stderr diff --git a/tests/ui-1.39_post/opt_vec_nonpositional.rs b/tests/ui/opt_vec_nonpositional.rs similarity index 100% rename from tests/ui-1.39_post/opt_vec_nonpositional.rs rename to tests/ui/opt_vec_nonpositional.rs diff --git a/tests/ui-pre_1.39/opt_vec_nonpositional.stderr b/tests/ui/opt_vec_nonpositional.stderr similarity index 100% rename from tests/ui-pre_1.39/opt_vec_nonpositional.stderr rename to tests/ui/opt_vec_nonpositional.stderr diff --git a/tests/ui-1.39_post/option_default_value.rs b/tests/ui/option_default_value.rs similarity index 100% rename from tests/ui-1.39_post/option_default_value.rs rename to tests/ui/option_default_value.rs diff --git a/tests/ui-pre_1.39/option_default_value.stderr b/tests/ui/option_default_value.stderr similarity index 100% rename from tests/ui-pre_1.39/option_default_value.stderr rename to tests/ui/option_default_value.stderr diff --git a/tests/ui-1.39_post/option_required.rs b/tests/ui/option_required.rs similarity index 100% rename from tests/ui-1.39_post/option_required.rs rename to tests/ui/option_required.rs diff --git a/tests/ui-pre_1.39/option_required.stderr b/tests/ui/option_required.stderr similarity index 100% rename from tests/ui-pre_1.39/option_required.stderr rename to tests/ui/option_required.stderr diff --git a/tests/ui-1.39_post/parse_empty_try_from_os.rs b/tests/ui/parse_empty_try_from_os.rs similarity index 100% rename from tests/ui-1.39_post/parse_empty_try_from_os.rs rename to tests/ui/parse_empty_try_from_os.rs diff --git a/tests/ui-pre_1.39/parse_empty_try_from_os.stderr b/tests/ui/parse_empty_try_from_os.stderr similarity index 100% rename from tests/ui-pre_1.39/parse_empty_try_from_os.stderr rename to tests/ui/parse_empty_try_from_os.stderr diff --git a/tests/ui-1.39_post/parse_function_is_not_path.rs b/tests/ui/parse_function_is_not_path.rs similarity index 100% rename from tests/ui-1.39_post/parse_function_is_not_path.rs rename to tests/ui/parse_function_is_not_path.rs diff --git a/tests/ui-pre_1.39/parse_function_is_not_path.stderr b/tests/ui/parse_function_is_not_path.stderr similarity index 100% rename from tests/ui-pre_1.39/parse_function_is_not_path.stderr rename to tests/ui/parse_function_is_not_path.stderr diff --git a/tests/ui-1.39_post/parse_literal_spec.rs b/tests/ui/parse_literal_spec.rs similarity index 100% rename from tests/ui-1.39_post/parse_literal_spec.rs rename to tests/ui/parse_literal_spec.rs diff --git a/tests/ui-pre_1.39/parse_literal_spec.stderr b/tests/ui/parse_literal_spec.stderr similarity index 100% rename from tests/ui-pre_1.39/parse_literal_spec.stderr rename to tests/ui/parse_literal_spec.stderr diff --git a/tests/ui-1.39_post/parse_not_zero_args.rs b/tests/ui/parse_not_zero_args.rs similarity index 100% rename from tests/ui-1.39_post/parse_not_zero_args.rs rename to tests/ui/parse_not_zero_args.rs diff --git a/tests/ui-pre_1.39/parse_not_zero_args.stderr b/tests/ui/parse_not_zero_args.stderr similarity index 100% rename from tests/ui-pre_1.39/parse_not_zero_args.stderr rename to tests/ui/parse_not_zero_args.stderr diff --git a/tests/ui-1.39_post/raw.rs b/tests/ui/raw.rs similarity index 100% rename from tests/ui-1.39_post/raw.rs rename to tests/ui/raw.rs diff --git a/tests/ui-pre_1.39/raw.stderr b/tests/ui/raw.stderr similarity index 100% rename from tests/ui-pre_1.39/raw.stderr rename to tests/ui/raw.stderr diff --git a/tests/ui-1.39_post/rename_all_wrong_casing.rs b/tests/ui/rename_all_wrong_casing.rs similarity index 100% rename from tests/ui-1.39_post/rename_all_wrong_casing.rs rename to tests/ui/rename_all_wrong_casing.rs diff --git a/tests/ui-pre_1.39/rename_all_wrong_casing.stderr b/tests/ui/rename_all_wrong_casing.stderr similarity index 100% rename from tests/ui-pre_1.39/rename_all_wrong_casing.stderr rename to tests/ui/rename_all_wrong_casing.stderr diff --git a/tests/ui-1.39_post/skip_flatten.rs b/tests/ui/skip_flatten.rs similarity index 100% rename from tests/ui-1.39_post/skip_flatten.rs rename to tests/ui/skip_flatten.rs diff --git a/tests/ui-pre_1.39/skip_flatten.stderr b/tests/ui/skip_flatten.stderr similarity index 100% rename from tests/ui-pre_1.39/skip_flatten.stderr rename to tests/ui/skip_flatten.stderr diff --git a/tests/ui-1.39_post/skip_subcommand.rs b/tests/ui/skip_subcommand.rs similarity index 100% rename from tests/ui-1.39_post/skip_subcommand.rs rename to tests/ui/skip_subcommand.rs diff --git a/tests/ui-pre_1.39/skip_subcommand.stderr b/tests/ui/skip_subcommand.stderr similarity index 100% rename from tests/ui-pre_1.39/skip_subcommand.stderr rename to tests/ui/skip_subcommand.stderr diff --git a/tests/ui-1.39_post/skip_with_other_options.rs b/tests/ui/skip_with_other_options.rs similarity index 100% rename from tests/ui-1.39_post/skip_with_other_options.rs rename to tests/ui/skip_with_other_options.rs diff --git a/tests/ui-pre_1.39/skip_with_other_options.stderr b/tests/ui/skip_with_other_options.stderr similarity index 100% rename from tests/ui-pre_1.39/skip_with_other_options.stderr rename to tests/ui/skip_with_other_options.stderr diff --git a/tests/ui-1.39_post/skip_without_default.rs b/tests/ui/skip_without_default.rs similarity index 100% rename from tests/ui-1.39_post/skip_without_default.rs rename to tests/ui/skip_without_default.rs diff --git a/tests/ui-pre_1.39/skip_without_default.stderr b/tests/ui/skip_without_default.stderr similarity index 100% rename from tests/ui-pre_1.39/skip_without_default.stderr rename to tests/ui/skip_without_default.stderr diff --git a/tests/ui-1.39_post/struct_flatten.rs b/tests/ui/struct_flatten.rs similarity index 100% rename from tests/ui-1.39_post/struct_flatten.rs rename to tests/ui/struct_flatten.rs diff --git a/tests/ui-pre_1.39/struct_flatten.stderr b/tests/ui/struct_flatten.stderr similarity index 100% rename from tests/ui-pre_1.39/struct_flatten.stderr rename to tests/ui/struct_flatten.stderr diff --git a/tests/ui-1.39_post/struct_parse.rs b/tests/ui/struct_parse.rs similarity index 100% rename from tests/ui-1.39_post/struct_parse.rs rename to tests/ui/struct_parse.rs diff --git a/tests/ui-pre_1.39/struct_parse.stderr b/tests/ui/struct_parse.stderr similarity index 100% rename from tests/ui-pre_1.39/struct_parse.stderr rename to tests/ui/struct_parse.stderr diff --git a/tests/ui-1.39_post/struct_subcommand.rs b/tests/ui/struct_subcommand.rs similarity index 100% rename from tests/ui-1.39_post/struct_subcommand.rs rename to tests/ui/struct_subcommand.rs diff --git a/tests/ui-pre_1.39/struct_subcommand.stderr b/tests/ui/struct_subcommand.stderr similarity index 100% rename from tests/ui-pre_1.39/struct_subcommand.stderr rename to tests/ui/struct_subcommand.stderr diff --git a/tests/ui-1.39_post/structopt_empty_attr.rs b/tests/ui/structopt_empty_attr.rs similarity index 100% rename from tests/ui-1.39_post/structopt_empty_attr.rs rename to tests/ui/structopt_empty_attr.rs diff --git a/tests/ui-pre_1.39/structopt_empty_attr.stderr b/tests/ui/structopt_empty_attr.stderr similarity index 100% rename from tests/ui-pre_1.39/structopt_empty_attr.stderr rename to tests/ui/structopt_empty_attr.stderr diff --git a/tests/ui-1.39_post/structopt_name_value_attr.rs b/tests/ui/structopt_name_value_attr.rs similarity index 100% rename from tests/ui-1.39_post/structopt_name_value_attr.rs rename to tests/ui/structopt_name_value_attr.rs diff --git a/tests/ui-pre_1.39/structopt_name_value_attr.stderr b/tests/ui/structopt_name_value_attr.stderr similarity index 100% rename from tests/ui-pre_1.39/structopt_name_value_attr.stderr rename to tests/ui/structopt_name_value_attr.stderr diff --git a/tests/ui-1.39_post/subcommand_and_flatten.rs b/tests/ui/subcommand_and_flatten.rs similarity index 100% rename from tests/ui-1.39_post/subcommand_and_flatten.rs rename to tests/ui/subcommand_and_flatten.rs diff --git a/tests/ui-pre_1.39/subcommand_and_flatten.stderr b/tests/ui/subcommand_and_flatten.stderr similarity index 100% rename from tests/ui-pre_1.39/subcommand_and_flatten.stderr rename to tests/ui/subcommand_and_flatten.stderr diff --git a/tests/ui-1.39_post/subcommand_and_methods.rs b/tests/ui/subcommand_and_methods.rs similarity index 100% rename from tests/ui-1.39_post/subcommand_and_methods.rs rename to tests/ui/subcommand_and_methods.rs diff --git a/tests/ui-pre_1.39/subcommand_and_methods.stderr b/tests/ui/subcommand_and_methods.stderr similarity index 100% rename from tests/ui-pre_1.39/subcommand_and_methods.stderr rename to tests/ui/subcommand_and_methods.stderr diff --git a/tests/ui-1.39_post/subcommand_and_parse.rs b/tests/ui/subcommand_and_parse.rs similarity index 100% rename from tests/ui-1.39_post/subcommand_and_parse.rs rename to tests/ui/subcommand_and_parse.rs diff --git a/tests/ui-pre_1.39/subcommand_and_parse.stderr b/tests/ui/subcommand_and_parse.stderr similarity index 100% rename from tests/ui-pre_1.39/subcommand_and_parse.stderr rename to tests/ui/subcommand_and_parse.stderr diff --git a/tests/ui-1.39_post/subcommand_opt_opt.rs b/tests/ui/subcommand_opt_opt.rs similarity index 100% rename from tests/ui-1.39_post/subcommand_opt_opt.rs rename to tests/ui/subcommand_opt_opt.rs diff --git a/tests/ui-pre_1.39/subcommand_opt_opt.stderr b/tests/ui/subcommand_opt_opt.stderr similarity index 100% rename from tests/ui-pre_1.39/subcommand_opt_opt.stderr rename to tests/ui/subcommand_opt_opt.stderr diff --git a/tests/ui-1.39_post/subcommand_opt_vec.rs b/tests/ui/subcommand_opt_vec.rs similarity index 100% rename from tests/ui-1.39_post/subcommand_opt_vec.rs rename to tests/ui/subcommand_opt_vec.rs diff --git a/tests/ui-pre_1.39/subcommand_opt_vec.stderr b/tests/ui/subcommand_opt_vec.stderr similarity index 100% rename from tests/ui-pre_1.39/subcommand_opt_vec.stderr rename to tests/ui/subcommand_opt_vec.stderr diff --git a/tests/ui-1.39_post/tuple_struct.rs b/tests/ui/tuple_struct.rs similarity index 100% rename from tests/ui-1.39_post/tuple_struct.rs rename to tests/ui/tuple_struct.rs diff --git a/tests/ui-pre_1.39/tuple_struct.stderr b/tests/ui/tuple_struct.stderr similarity index 100% rename from tests/ui-pre_1.39/tuple_struct.stderr rename to tests/ui/tuple_struct.stderr