Upgrade rust/crates/structopt to 0.3.23

Test: make
Change-Id: I4dba7f980033089367c7735fedcc21beee82e2b7
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 887fa2d..0057313 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "004cfc218e7fbfdbecc4088f9e3fa5061f36cb4d"
+    "sha1": "88e5402df017c052f1524f293b2e13bd01810819"
   }
 }
diff --git a/.travis.yml b/.travis.yml
index 14f5a6c..7b4fcc9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,7 +22,7 @@
       before_script: rustup component add clippy
       script: cargo clippy --all -- -D warnings
 
-    - rust: 1.36.0
+    - rust: 1.46.0
     - rust: stable
     - rust: beta
     - rust: nightly
diff --git a/Android.bp b/Android.bp
index 3051273..ff4330f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,6 +41,8 @@
     name: "libstructopt",
     host_supported: true,
     crate_name: "structopt",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.3.23",
     srcs: ["src/lib.rs"],
     edition: "2018",
     features: ["default"],
@@ -54,25 +56,3 @@
         "com.android.virt",
     ],
 }
-
-// dependent_library ["feature_list"]
-//   ansi_term-0.11.0
-//   atty-0.2.14
-//   bitflags-1.2.1 "default"
-//   clap-2.33.3 "ansi_term,atty,color,default,strsim,suggestions,vec_map"
-//   heck-0.3.3
-//   lazy_static-1.4.0
-//   libc-0.2.98
-//   proc-macro-error-1.0.4 "default,syn,syn-error"
-//   proc-macro-error-attr-1.0.4
-//   proc-macro2-1.0.28 "default,proc-macro"
-//   quote-1.0.9 "default,proc-macro"
-//   strsim-0.8.0
-//   structopt-derive-0.4.15
-//   syn-1.0.74 "clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote"
-//   textwrap-0.11.0
-//   unicode-segmentation-1.8.0
-//   unicode-width-0.1.8 "default"
-//   unicode-xid-0.2.2 "default"
-//   vec_map-0.8.2
-//   version_check-0.9.3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 117ef2d..cdf1ba7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+# v0.3.23 (2021-08-30)
+
+* Update minimal rust version to 1.46 because of bitflags 1.3
+* Fixed [a bug that occurs when the type of `map` becomes ambiguous](https://github.com/TeXitoi/structopt/issues/490).
+* Add support for [skip for enum variant subcommands](https://github.com/TeXitoi/structopt/issues/493)
+
 # v0.3.22 (2021-07-04)
 
 * Add support for [generics in derive](https://github.com/TeXitoi/structopt/issues/128)
diff --git a/Cargo.toml b/Cargo.toml
index 260ef4a..ba91744 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "structopt"
-version = "0.3.22"
+version = "0.3.23"
 authors = ["Guillaume Pinot <[email protected]>", "others"]
 description = "Parse command line argument by defining a struct."
 documentation = "https://docs.rs/structopt"
@@ -35,12 +35,12 @@
 package = "paw"
 
 [dependencies.structopt-derive]
-version = "=0.4.15"
+version = "=0.4.16"
 [dev-dependencies.rustversion]
 version = "1"
 
 [dev-dependencies.strum]
-version = "0.20"
+version = "0.21"
 features = ["derive"]
 
 [dev-dependencies.trybuild]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index d45ecac..bccc07f 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "structopt"
-version = "0.3.22"
+version = "0.3.23"
 edition = "2018"
 authors = ["Guillaume Pinot <[email protected]>", "others"]
 description = "Parse command line argument by defining a struct."
@@ -28,11 +28,11 @@
 
 [dependencies]
 clap = { version = "2.33", default-features = false }
-structopt-derive = { path = "structopt-derive", version = "=0.4.15" }
+structopt-derive = { path = "structopt-derive", version = "=0.4.16" }
 lazy_static = "1.4.0"
 paw_dep = { version = "1", optional = true, package = "paw" }
 
 [dev-dependencies]
 trybuild = { version = "1.0.5", features = ["diff"] }
 rustversion = "1"
-strum = { version = "0.20", features = ["derive"] }
+strum = { version = "0.21", features = ["derive"] }
diff --git a/METADATA b/METADATA
index 40329f0..4f3ccd1 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/structopt/structopt-0.3.22.crate"
+    value: "https://static.crates.io/crates/structopt/structopt-0.3.23.crate"
   }
-  version: "0.3.22"
+  version: "0.3.23"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 8
-    day: 9
+    month: 9
+    day: 22
   }
 }
diff --git a/README.md b/README.md
index 6609488..dfb2059 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # StructOpt
 
-[![Build status](https://travis-ci.org/TeXitoi/structopt.svg?branch=master)](https://travis-ci.org/TeXitoi/structopt) [![](https://img.shields.io/crates/v/structopt.svg)](https://crates.io/crates/structopt) [![](https://docs.rs/structopt/badge.svg)](https://docs.rs/structopt)
+[![Build status](https://travis-ci.com/TeXitoi/structopt.svg?branch=master)](https://app.travis-ci.com/github/TeXitoi/structopt) [![](https://img.shields.io/crates/v/structopt.svg)](https://crates.io/crates/structopt) [![](https://docs.rs/structopt/badge.svg)](https://docs.rs/structopt)
 [![unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
 
 Parse command line arguments by defining a struct.  It combines [clap](https://crates.io/crates/clap) with custom derive.
diff --git a/examples/true_or_false.rs b/examples/true_or_false.rs
index 31a543e..814f3d8 100644
--- a/examples/true_or_false.rs
+++ b/examples/true_or_false.rs
@@ -23,7 +23,7 @@
     bar: bool,
 
     // `bool` can be positional only with explicit `parse(...)` annotation
-    #[structopt(long, parse(try_from_str))]
+    #[structopt(parse(try_from_str))]
     boom: bool,
 }
 
diff --git a/src/lib.rs b/src/lib.rs
index b6e6b73..f7c5ce7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1089,8 +1089,6 @@
 //! }
 //! ```
 
-
-
 // those mains are for a reason
 #![allow(clippy::needless_doctest_main)]
 
diff --git a/tests/custom-string-parsers.rs b/tests/custom-string-parsers.rs
index 89070ed..8fe055b 100644
--- a/tests/custom-string-parsers.rs
+++ b/tests/custom-string-parsers.rs
@@ -76,7 +76,11 @@
     let err = HexOpt::clap()
         .get_matches_from_safe(&["test", "-n", "gg"])
         .unwrap_err();
-    assert!(err.message.contains("invalid digit found in string"), err);
+    assert!(
+        err.message.contains("invalid digit found in string"),
+        "{}",
+        err
+    );
 }
 
 fn custom_parser_1(_: &str) -> &'static str {
diff --git a/tests/generics.rs b/tests/generics.rs
index 896f98a..0da349b 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -1,137 +1,145 @@
-
 use structopt::StructOpt;
 
 #[test]
 fn generic_struct_flatten() {
-
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Inner{
-        pub answer: isize
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Inner {
+        pub answer: isize,
     }
 
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Outer<T:StructOpt>{
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Outer<T: StructOpt> {
         #[structopt(flatten)]
-        pub inner: T
+        pub inner: T,
     }
 
     assert_eq!(
-        Outer{inner: Inner{ answer: 42 }},
-        Outer::from_iter(&[ "--answer",  "42" ])
+        Outer {
+            inner: Inner { answer: 42 }
+        },
+        Outer::from_iter(&["--answer", "42"])
     )
 }
 
 #[test]
 fn generic_struct_flatten_w_where_clause() {
-
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Inner{
-        pub answer: isize
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Inner {
+        pub answer: isize,
     }
 
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Outer<T> where T:StructOpt {
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Outer<T>
+    where
+        T: StructOpt,
+    {
         #[structopt(flatten)]
-        pub inner: T
+        pub inner: T,
     }
 
     assert_eq!(
-        Outer{inner: Inner{ answer: 42 }},
-        Outer::from_iter(&[ "--answer",  "42" ])
+        Outer {
+            inner: Inner { answer: 42 }
+        },
+        Outer::from_iter(&["--answer", "42"])
     )
 }
 
 #[test]
 fn generic_enum() {
-
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Inner{
-        pub answer: isize
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Inner {
+        pub answer: isize,
     }
 
-    #[derive(StructOpt,PartialEq,Debug)]
+    #[derive(StructOpt, PartialEq, Debug)]
     enum GenericEnum<T: StructOpt> {
-
         Start(T),
         Stop,
     }
 
     assert_eq!(
-        GenericEnum::Start(Inner{answer: 42}),
-        GenericEnum::from_iter(&[ "test", "start", "42" ])
+        GenericEnum::Start(Inner { answer: 42 }),
+        GenericEnum::from_iter(&["test", "start", "42"])
     )
-
 }
 
 #[test]
 fn generic_enum_w_where_clause() {
-
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Inner{
-        pub answer: isize
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Inner {
+        pub answer: isize,
     }
 
-    #[derive(StructOpt,PartialEq,Debug)]
-    enum GenericEnum<T> where T: StructOpt {
-
+    #[derive(StructOpt, PartialEq, Debug)]
+    enum GenericEnum<T>
+    where
+        T: StructOpt,
+    {
         Start(T),
         Stop,
     }
 
     assert_eq!(
-        GenericEnum::Start(Inner{answer: 42}),
-        GenericEnum::from_iter(&[ "test", "start", "42" ])
+        GenericEnum::Start(Inner { answer: 42 }),
+        GenericEnum::from_iter(&["test", "start", "42"])
     )
-
 }
 
 #[test]
 fn generic_w_fromstr_trait_bound() {
-
     use std::{fmt, str::FromStr};
 
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Opt<T> where T:FromStr, <T as FromStr>::Err: fmt::Debug + fmt::Display
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Opt<T>
+    where
+        T: FromStr,
+        <T as FromStr>::Err: fmt::Debug + fmt::Display,
     {
-        answer: T
+        answer: T,
     }
 
     assert_eq!(
-        Opt::<isize>{answer:42},
-        Opt::<isize>::from_iter([& "--answer", "42" ])
+        Opt::<isize> { answer: 42 },
+        Opt::<isize>::from_iter(&["--answer", "42"])
     )
 }
 
 #[test]
 fn generic_wo_trait_bound() {
-
     use std::time::Duration;
 
-    #[derive(StructOpt,PartialEq,Debug)]
+    #[derive(StructOpt, PartialEq, Debug)]
     struct Opt<T> {
         answer: isize,
         #[structopt(skip)]
-        took: Option<T>
+        took: Option<T>,
     }
 
     assert_eq!(
-        Opt::<Duration>{answer:42,took:None},
-        Opt::<Duration>::from_iter([& "--answer", "42" ])
+        Opt::<Duration> {
+            answer: 42,
+            took: None
+        },
+        Opt::<Duration>::from_iter(&["--answer", "42"])
     )
 }
 
 #[test]
 fn generic_where_clause_w_trailing_comma() {
-
     use std::{fmt, str::FromStr};
 
-    #[derive(StructOpt,PartialEq,Debug)]
-    struct Opt<T> where T:FromStr, <T as FromStr>::Err: fmt::Debug + fmt::Display {
-        pub answer: T
+    #[derive(StructOpt, PartialEq, Debug)]
+    struct Opt<T>
+    where
+        T: FromStr,
+        <T as FromStr>::Err: fmt::Debug + fmt::Display,
+    {
+        pub answer: T,
     }
 
     assert_eq!(
-        Opt::<isize>{answer:42},
-        Opt::<isize>::from_iter(&[ "--answer", "42" ])
+        Opt::<isize> { answer: 42 },
+        Opt::<isize>::from_iter(&["--answer", "42"])
     )
 }
diff --git a/tests/issues.rs b/tests/issues.rs
index 8b4ac4b..5860c49 100644
--- a/tests/issues.rs
+++ b/tests/issues.rs
@@ -115,3 +115,32 @@
         Opt::from_iter(&["test", "only_one_arg"])
     );
 }
+
+#[test]
+fn issue_490() {
+    use std::iter::FromIterator;
+    use std::str::FromStr;
+    use structopt::StructOpt;
+
+    struct U16ish;
+    impl FromStr for U16ish {
+        type Err = ();
+        fn from_str(_: &str) -> Result<Self, Self::Err> {
+            unimplemented!()
+        }
+    }
+    impl<'a> FromIterator<&'a U16ish> for Vec<u16> {
+        fn from_iter<T: IntoIterator<Item = &'a U16ish>>(_: T) -> Self {
+            unimplemented!()
+        }
+    }
+
+    #[derive(StructOpt, Debug)]
+    struct Opt {
+        opt_vec: Vec<u16>,
+        #[structopt(long)]
+        opt_opt_vec: Option<Vec<u16>>,
+    }
+
+    // Assert that it compiles
+}
diff --git a/tests/macro-errors.rs b/tests/macro-errors.rs
index 54b405a..74342f7 100644
--- a/tests/macro-errors.rs
+++ b/tests/macro-errors.rs
@@ -5,7 +5,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 
-#[rustversion::attr(any(not(stable), before(1.43)), ignore)]
+#[rustversion::attr(any(not(stable), before(1.54)), ignore)]
 #[test]
 fn ui() {
     let t = trybuild::TestCases::new();
diff --git a/tests/non_literal_attributes.rs b/tests/non_literal_attributes.rs
index 75b6b71..4c3a442 100644
--- a/tests/non_literal_attributes.rs
+++ b/tests/non_literal_attributes.rs
@@ -143,5 +143,9 @@
     let err = HexOpt::clap()
         .get_matches_from_safe(&["test", "-n", "gg"])
         .unwrap_err();
-    assert!(err.message.contains("invalid digit found in string"), err);
+    assert!(
+        err.message.contains("invalid digit found in string"),
+        "{}",
+        err
+    );
 }
diff --git a/tests/special_types.rs b/tests/special_types.rs
index ffed5e2..ac7d143 100644
--- a/tests/special_types.rs
+++ b/tests/special_types.rs
@@ -17,7 +17,7 @@
                 Ok(self::bool(s.into()))
             }
         }
-    };
+    }
 
     #[derive(StructOpt, PartialEq, Debug)]
     struct Opt {
diff --git a/tests/subcommands.rs b/tests/subcommands.rs
index 1fc8e76..4ee738b 100644
--- a/tests/subcommands.rs
+++ b/tests/subcommands.rs
@@ -301,3 +301,49 @@
 
     assert_eq!(Opt::from_iter(&["test"]), Opt { sub: None });
 }
+
+#[test]
+fn skip_subcommand() {
+    #[derive(Debug, PartialEq, StructOpt)]
+    struct Opt {
+        #[structopt(subcommand)]
+        sub: Subcommands,
+    }
+
+    #[derive(Debug, PartialEq, StructOpt)]
+    enum Subcommands {
+        Add,
+        Remove,
+
+        #[allow(dead_code)]
+        #[structopt(skip)]
+        Skip,
+    }
+
+    assert_eq!(
+        Opt::from_iter(&["test", "add"]),
+        Opt {
+            sub: Subcommands::Add
+        }
+    );
+
+    assert_eq!(
+        Opt::from_iter(&["test", "remove"]),
+        Opt {
+            sub: Subcommands::Remove
+        }
+    );
+
+    let res = Opt::from_iter_safe(&["test", "skip"]);
+    assert!(
+        matches!(
+            res,
+            Err(clap::Error {
+                kind: clap::ErrorKind::UnknownArgument,
+                ..
+            })
+        ),
+        "Unexpected result: {:?}",
+        res
+    );
+}
diff --git a/tests/ui/non_existent_attr.stderr b/tests/ui/non_existent_attr.stderr
index 61f784e..5765597 100644
--- a/tests/ui/non_existent_attr.stderr
+++ b/tests/ui/non_existent_attr.stderr
@@ -1,4 +1,4 @@
-error[E0599]: no method named `non_existing_attribute` found for struct `Arg<'_, '_>` in the current scope
+error[E0599]: no method named `non_existing_attribute` found for struct `Arg` in the current scope
   --> $DIR/non_existent_attr.rs:14:24
    |
 14 |     #[structopt(short, non_existing_attribute = 1)]
diff --git a/tests/ui/tuple_struct.stderr b/tests/ui/tuple_struct.stderr
index 31705c9..ad92385 100644
--- a/tests/ui/tuple_struct.stderr
+++ b/tests/ui/tuple_struct.stderr
@@ -4,4 +4,4 @@
 11 | #[derive(StructOpt, Debug)]
    |          ^^^^^^^^^
    |
-   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the derive macro `StructOpt` (in Nightly builds, run with -Z macro-backtrace for more info)