Snap for 8564071 from 22216534944c6f96a2c997ddbab70d16379e6f42 to mainline-conscrypt-release

Change-Id: Ib9b2bef9e8b586d11817fed6e775b34a4cd95b04
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index f40cd7e..80f1df4 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "8a3cec3cfc7b8417ef8cc2970f7de27ff2b6a023"
+    "sha1": "0d6c7a078176d77e3fc8911c00bf4bb06d3ba9bd"
   }
 }
diff --git a/Android.bp b/Android.bp
index 68b8394..d118e70 100644
--- a/Android.bp
+++ b/Android.bp
@@ -50,6 +50,8 @@
     name: "libproc_macro_nested",
     host_supported: true,
     crate_name: "proc_macro_nested",
+    cargo_env_compat: true,
+    cargo_pkg_version: "0.1.7",
     srcs: [
         "src/lib.rs",
         ":copy_proc-macro-nested_build_out",
@@ -57,33 +59,9 @@
     edition: "2015",
     apex_available: [
         "//apex_available:platform",
+        "com.android.bluetooth",
         "com.android.resolv",
         "com.android.virt",
     ],
     min_sdk_version: "29",
 }
-
-rust_defaults {
-    name: "proc-macro-nested_defaults",
-    crate_name: "proc_macro_nested",
-    srcs: [
-        "src/lib.rs",
-        ":copy_proc-macro-nested_build_out",
-    ],
-    test_suites: ["general-tests"],
-    auto_gen_config: true,
-    edition: "2015",
-}
-
-rust_test_host {
-    name: "proc-macro-nested_host_test_src_lib",
-    defaults: ["proc-macro-nested_defaults"],
-    test_options: {
-        unit_test: true,
-    },
-}
-
-rust_test {
-    name: "proc-macro-nested_device_test_src_lib",
-    defaults: ["proc-macro-nested_defaults"],
-}
diff --git a/Cargo.toml b/Cargo.toml
index 0e57e36..f768689 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@
 
 [package]
 name = "proc-macro-nested"
-version = "0.1.6"
+version = "0.1.7"
 authors = ["David Tolnay <[email protected]>"]
 description = "Support for nested proc-macro-hack invocations"
 license = "MIT OR Apache-2.0"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index fd0fa99..aa306db 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "proc-macro-nested"
-version = "0.1.6"
+version = "0.1.7"
 authors = ["David Tolnay <[email protected]>"]
 license = "MIT OR Apache-2.0"
 description = "Support for nested proc-macro-hack invocations"
diff --git a/METADATA b/METADATA
index 67d5c26..478b925 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/proc-macro-nested/proc-macro-nested-0.1.6.crate"
+    value: "https://static.crates.io/crates/proc-macro-nested/proc-macro-nested-0.1.7.crate"
   }
-  version: "0.1.6"
+  version: "0.1.7"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2020
-    month: 7
-    day: 10
+    year: 2021
+    month: 6
+    day: 16
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
deleted file mode 100644
index 0cba459..0000000
--- a/TEST_MAPPING
+++ /dev/null
@@ -1,11 +0,0 @@
-// Generated by cargo2android.py for tests in Android.bp
-{
-  "presubmit": [
-    {
-      "name": "proc-macro-nested_device_test_src_lib"
-    },
-    {
-      "name": "futures-util_device_test_src_lib"
-    }
-  ]
-}
diff --git a/build.rs b/build.rs
index ef56f8e..01dbc0d 100644
--- a/build.rs
+++ b/build.rs
@@ -1,7 +1,7 @@
 use std::env;
 use std::fs;
 use std::iter;
-use std::path::Path;
+use std::path::{self, Path};
 
 /*
 #[doc(hidden)]
@@ -27,7 +27,9 @@
         content += &format!("    ({}) => {{ proc_macro_call_{}!() }};\n", bangs, i);
     }
     content += "    ($(!)+) => {\n";
-    content += "        compile_error! { \"this macro does not support >64 nested macro invocations\" }\n";
+    content += "        compile_error! {\n";
+    content += "            \"this macro does not support >64 nested macro invocations\"\n";
+    content += "        }\n";
     content += "    };\n";
     content += "}\n";
 
@@ -43,4 +45,6 @@
     {
         fs::write(dest_path, content).unwrap();
     }
+
+    println!("cargo:rustc-env=PATH_SEPARATOR={}", path::MAIN_SEPARATOR);
 }
diff --git a/cargo2android.json b/cargo2android.json
index 43dbcda..2d87bb2 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,13 +1,14 @@
 {
   "apex-available": [
     "//apex_available:platform",
+    "com.android.bluetooth",
     "com.android.resolv",
     "com.android.virt"
   ],
-  "min_sdk_version": "29",
   "copy-out": true,
   "dependencies": true,
   "device": true,
+  "min-sdk-version": "29",
   "run": true,
   "tests": true
-}
\ No newline at end of file
+}
diff --git a/out/count.rs b/out/count.rs
index 41f84a9..4485b0c 100644
--- a/out/count.rs
+++ b/out/count.rs
@@ -67,6 +67,8 @@
     (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) => { proc_macro_call_63!() };
     (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!) => { proc_macro_call_64!() };
     ($(!)+) => {
-        compile_error! { "this macro does not support >64 nested macro invocations" }
+        compile_error! {
+            "this macro does not support >64 nested macro invocations"
+        }
     };
 }
diff --git a/patches/std.diff b/patches/std.diff
deleted file mode 100644
index 6d71af2..0000000
--- a/patches/std.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/lib.rs b/src/lib.rs
-index 9ec6df0..0cd8302 100644
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -40,6 +40,9 @@
- 
- #![no_std]
- 
-+// ANDROID: Use std to allow building as a dylib.
-+extern crate std;
-+
- include!(concat!(env!("OUT_DIR"), "/count.rs"));
- 
- #[doc(hidden)]
diff --git a/patches/std_env.diff b/patches/std_env.diff
new file mode 100644
index 0000000..da99129
--- /dev/null
+++ b/patches/std_env.diff
@@ -0,0 +1,16 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 9ec6df0..0cd8302 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -40,7 +40,10 @@
+ 
+ #![no_std]
+ 
++// ANDROID: Use std to allow building as a dylib.
++extern crate std;
++
+-include!(concat!(env!("OUT_DIR"), env!("PATH_SEPARATOR"), "count.rs"));
++include!(concat!(env!("OUT_DIR"), "/count.rs"));
+ 
+ #[doc(hidden)]
+ #[macro_export]