Upgrade rust/crates/tinyvec to 1.4.0

Test: make
Change-Id: Iab5b8bbf28c57673b410246638c53e60bc2eddf6
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index a951fcc..3d0fa1e 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "a4bbfa9864d6a9d5ac607841025b517e618f3c8f"
+    "sha1": "7518868e4b9c802b214ce393f79f82fa13bef251"
   }
 }
diff --git a/Android.bp b/Android.bp
index 47bf80c..30327d3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,6 +43,8 @@
     name: "libtinyvec",
     host_supported: true,
     crate_name: "tinyvec",
+    cargo_env_compat: true,
+    cargo_pkg_version: "1.4.0",
     srcs: ["src/lib.rs"],
     edition: "2018",
     features: [
@@ -59,6 +61,3 @@
     ],
     min_sdk_version: "29",
 }
-
-// dependent_library ["feature_list"]
-//   tinyvec_macros-0.1.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea5226b..1bcc2a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Changelog

 

+## 1.4.0

+

+* [saethlin](https://github.com/saethlin) stabilized the usage of const generics and array map with the `rustc_1_55` feature.

+  [pr 149](https://github.com/Lokathor/tinyvec/pull/149)

+

 ## 1.3.1

 

 * Improved the performance of the `clone_from` method [pr 144](https://github.com/Lokathor/tinyvec/pull/144)

diff --git a/Cargo.toml b/Cargo.toml
index fec505e..3ab13bd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,17 +3,16 @@
 # When uploading crates to the registry Cargo will automatically
 # "normalize" Cargo.toml files for maximal compatibility
 # with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
 #
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
 
 [package]
 edition = "2018"
 name = "tinyvec"
-version = "1.3.1"
+version = "1.4.0"
 authors = ["Lokathor <zefria@gmail.com>"]
 description = "`tinyvec` provides 100% safe vec-like data structures."
 keywords = ["vec", "no_std", "no-std"]
@@ -21,11 +20,11 @@
 license = "Zlib OR Apache-2.0 OR MIT"
 repository = "https://github.com/Lokathor/tinyvec"
 [package.metadata.docs.rs]
-features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
+features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
 rustdoc-args = ["--cfg", "docs_rs"]
 
 [package.metadata.playground]
-features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
+features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
 [profile.test]
 opt-level = 3
 
@@ -60,6 +59,6 @@
 default = []
 experimental_write_impl = []
 grab_spare_slice = []
-nightly_const_generics = []
 nightly_slice_partition_dedup = []
 rustc_1_40 = []
+rustc_1_55 = ["rustc_1_40"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index d0b0e31..a262ed1 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
 [package]
 name = "tinyvec"
 description = "`tinyvec` provides 100% safe vec-like data structures."
-version = "1.3.1"
+version = "1.4.0"
 authors = ["Lokathor <zefria@gmail.com>"]
 edition = "2018"
 license = "Zlib OR Apache-2.0 OR MIT"
@@ -31,14 +31,15 @@
 # DoubleEndedIterator::nth_back - 1.40
 rustc_1_40 = []
 

+# features that require rustc 1.55
+# use const generics to implement Array for all array lengths
+rustc_1_55 = ["rustc_1_40"]
+

 # allow use of nightly feature `slice_partition_dedup`,
 # will become useless once that is stabilized:
 # https://github.com/rust-lang/rust/issues/54279
 nightly_slice_partition_dedup = []
 

-# use const generics for arrays
-nightly_const_generics = []
-

 # EXPERIMENTAL: Not part of SemVer. It adds `core::fmt::Write` to `ArrayVec`
 # and `SliceVec`. It works on Stable Rust, but Vec normally supports the
 # `std::io::Write` trait instead of `core::fmt::Write`, so we're keeping it as
@@ -46,11 +47,11 @@
 experimental_write_impl = []
 

 [package.metadata.docs.rs]
-features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
+features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
 rustdoc-args = ["--cfg","docs_rs"]
 

 [package.metadata.playground]
-features = ["alloc", "grab_spare_slice", "rustc_1_40", "serde"]
+features = ["alloc", "grab_spare_slice", "rustc_1_40", "rustc_1_55", "serde"]
 

 [profile.test]
 opt-level = 3
diff --git a/METADATA b/METADATA
index b1c756c..8445b96 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/tinyvec/tinyvec-1.3.1.crate"
+    value: "https://static.crates.io/crates/tinyvec/tinyvec-1.4.0.crate"
   }
-  version: "1.3.1"
+  version: "1.4.0"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 8
-    day: 9
+    month: 9
+    day: 22
   }
 }
diff --git a/src/array.rs b/src/array.rs
index 75f33c6..cc84aaf 100644
--- a/src/array.rs
+++ b/src/array.rs
@@ -8,7 +8,7 @@
 ///

 /// You are generally **not** expected to need to implement this yourself. It is

 /// already implemented for all the major array lengths (`0..=32` and the powers

-/// of 2 up to 4,096).

+/// of 2 up to 4,096), or for all array lengths with the feature `rustc_1_55`.

 ///

 /// **Additional lengths can easily be added upon request.**

 ///

@@ -41,8 +41,8 @@
   fn default() -> Self;

 }

 

-#[cfg(feature = "nightly_const_generics")]

+#[cfg(feature = "rustc_1_55")]

 mod const_generic_impl;

 

-#[cfg(not(feature = "nightly_const_generics"))]

+#[cfg(not(feature = "rustc_1_55"))]

 mod generated_impl;

diff --git a/src/lib.rs b/src/lib.rs
index ce06601..b3ee259 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,10 +4,6 @@
   feature = "nightly_slice_partition_dedup",

   feature(slice_partition_dedup)

 )]

-#![cfg_attr(

-  feature = "nightly_const_generics",

-  feature(min_const_generics, array_map)

-)]

 #![cfg_attr(docs_rs, feature(doc_cfg))]

 #![warn(clippy::missing_inline_in_public_items)]

 #![warn(clippy::must_use_candidate)]