diff options
author | Haibo Huang <hhb@google.com> | 2020-09-23 21:23:42 -0700 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2020-09-23 21:23:42 -0700 |
commit | e7bfadf396e6d7aca36ef17424eae852404775d6 (patch) | |
tree | 254d00e0918f220a2662ca8f65ed510bd2220eba /tests/ui | |
parent | 67fbbcc40fbcbcb1d18c74f7e1edcffb33d79b58 (diff) | |
download | structopt-e7bfadf396e6d7aca36ef17424eae852404775d6.tar.gz |
Upgrade rust/crates/structopt to 0.3.18
Test: make
Change-Id: Ib5d515b0f5e9ac7fdd0f2f8e2f00ecf54dbf63ca
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/flatten_and_doc.rs | 30 | ||||
-rw-r--r-- | tests/ui/flatten_and_doc.stderr | 5 | ||||
-rw-r--r-- | tests/ui/flatten_and_methods.stderr | 2 | ||||
-rw-r--r-- | tests/ui/non_existent_attr.stderr | 4 | ||||
-rw-r--r-- | tests/ui/tuple_struct.stderr | 2 |
5 files changed, 5 insertions, 38 deletions
diff --git a/tests/ui/flatten_and_doc.rs b/tests/ui/flatten_and_doc.rs deleted file mode 100644 index 2dc154d..0000000 --- a/tests/ui/flatten_and_doc.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018 Guillaume Pinot (@TeXitoi) <texitoi@texitoi.eu> -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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/flatten_and_doc.stderr b/tests/ui/flatten_and_doc.stderr deleted file mode 100644 index 2724dbb..0000000 --- a/tests/ui/flatten_and_doc.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: methods and doc comments are not allowed for flattened entry - --> $DIR/flatten_and_doc.rs:23:17 - | -23 | #[structopt(flatten)] - | ^^^^^^^ diff --git a/tests/ui/flatten_and_methods.stderr b/tests/ui/flatten_and_methods.stderr index f058eb3..77d97ae 100644 --- a/tests/ui/flatten_and_methods.stderr +++ b/tests/ui/flatten_and_methods.stderr @@ -1,4 +1,4 @@ -error: methods and doc comments are not allowed for flattened entry +error: methods are not allowed for flattened entry --> $DIR/flatten_and_methods.rs:22:24 | 22 | #[structopt(short, flatten)] diff --git a/tests/ui/non_existent_attr.stderr b/tests/ui/non_existent_attr.stderr index 99dc781..e5edb56 100644 --- a/tests/ui/non_existent_attr.stderr +++ b/tests/ui/non_existent_attr.stderr @@ -1,5 +1,5 @@ -error[E0599]: no method named `non_existing_attribute` found for struct `clap::args::arg::Arg<'_, '_>` in the current scope +error[E0599]: no method named `non_existing_attribute` found for struct `structopt::clap::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<'_, '_>` + | ^^^^^^^^^^^^^^^^^^^^^^ method not found in `structopt::clap::Arg<'_, '_>` diff --git a/tests/ui/tuple_struct.stderr b/tests/ui/tuple_struct.stderr index 9f2876f..31705c9 100644 --- a/tests/ui/tuple_struct.stderr +++ b/tests/ui/tuple_struct.stderr @@ -3,3 +3,5 @@ error: structopt only supports non-tuple structs and enums | 11 | #[derive(StructOpt, Debug)] | ^^^^^^^^^ + | + = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) |