Upgrade rust/crates/proc-macro2 to 1.0.28

Test: make
Change-Id: I83a1c427db2bd60913d19953bcd2ec5c18eb2d46
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 409e220..0b4ad97 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "2517d6283f4e6a308519881bf7222f60c785626d"
+    "sha1": "93c4df24e2d5ef9ddff484a7086f2e0018a13507"
   }
 }
diff --git a/Android.bp b/Android.bp
index da5134a..3118612 100644
--- a/Android.bp
+++ b/Android.bp
@@ -91,7 +91,7 @@
 }
 
 rust_defaults {
-    name: "proc-macro2_defaults",
+    name: "proc-macro2_test_defaults",
     crate_name: "proc_macro2",
     test_suites: ["general-tests"],
     auto_gen_config: true,
@@ -118,7 +118,7 @@
 
 rust_test_host {
     name: "proc-macro2_host_test_tests_comments",
-    defaults: ["proc-macro2_defaults"],
+    defaults: ["proc-macro2_test_defaults"],
     srcs: ["tests/comments.rs"],
     test_options: {
         unit_test: true,
@@ -127,7 +127,7 @@
 
 rust_test_host {
     name: "proc-macro2_host_test_tests_features",
-    defaults: ["proc-macro2_defaults"],
+    defaults: ["proc-macro2_test_defaults"],
     srcs: ["tests/features.rs"],
     test_options: {
         unit_test: true,
@@ -136,7 +136,7 @@
 
 rust_test_host {
     name: "proc-macro2_host_test_tests_marker",
-    defaults: ["proc-macro2_defaults"],
+    defaults: ["proc-macro2_test_defaults"],
     srcs: ["tests/marker.rs"],
     test_options: {
         unit_test: true,
@@ -145,7 +145,7 @@
 
 rust_test_host {
     name: "proc-macro2_host_test_tests_test",
-    defaults: ["proc-macro2_defaults"],
+    defaults: ["proc-macro2_test_defaults"],
     srcs: ["tests/test.rs"],
     test_options: {
         unit_test: true,
@@ -154,7 +154,7 @@
 
 rust_test_host {
     name: "proc-macro2_host_test_tests_test_fmt",
-    defaults: ["proc-macro2_defaults"],
+    defaults: ["proc-macro2_test_defaults"],
     srcs: ["tests/test_fmt.rs"],
     test_options: {
         unit_test: true,
@@ -162,6 +162,6 @@
 }
 
 // dependent_library ["feature_list"]
-//   proc-macro2-1.0.27
+//   proc-macro2-1.0.28
 //   quote-1.0.9
 //   unicode-xid-0.2.2 "default"
diff --git a/Cargo.toml b/Cargo.toml
index 57fbf1b..4285fc8 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 = "proc-macro2"
-version = "1.0.27"
+version = "1.0.28"
 authors = ["Alex Crichton <alex@alexcrichton.com>", "David Tolnay <dtolnay@gmail.com>"]
 description = "A substitute implementation of the compiler's `proc_macro` API to decouple\ntoken-based libraries from the procedural macro use case.\n"
 documentation = "https://docs.rs/proc-macro2"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 324c33c..254063e 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "proc-macro2"
-version = "1.0.27" # remember to update html_root_url
+version = "1.0.28" # remember to update html_root_url
 authors = ["Alex Crichton <alex@alexcrichton.com>", "David Tolnay <dtolnay@gmail.com>"]
 license = "MIT OR Apache-2.0"
 readme = "README.md"
diff --git a/METADATA b/METADATA
index 9b63d5c..fee70d5 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.27.crate"
+    value: "https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.28.crate"
   }
-  version: "1.0.27"
+  version: "1.0.28"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 6
-    day: 21
+    month: 8
+    day: 9
   }
 }
diff --git a/build.rs b/build.rs
index b247d87..815292e 100644
--- a/build.rs
+++ b/build.rs
@@ -35,6 +35,7 @@
 //     location inside spans is a performance hit.
 
 use std::env;
+use std::iter;
 use std::process::{self, Command};
 use std::str;
 
@@ -132,15 +133,33 @@
     //
     //     -Zallow-features=feature1,feature2
 
-    if let Some(rustflags) = env::var_os("RUSTFLAGS") {
-        for mut flag in rustflags.to_string_lossy().split(' ') {
-            if flag.starts_with("-Z") {
-                flag = &flag["-Z".len()..];
-            }
-            if flag.starts_with("allow-features=") {
-                flag = &flag["allow-features=".len()..];
-                return flag.split(',').any(|allowed| allowed == feature);
-            }
+    let flags_var;
+    let flags_var_string;
+    let mut flags_var_split;
+    let mut flags_none;
+    let flags: &mut dyn Iterator<Item = &str> =
+        if let Some(encoded_rustflags) = env::var_os("CARGO_ENCODED_RUSTFLAGS") {
+            flags_var = encoded_rustflags;
+            flags_var_string = flags_var.to_string_lossy();
+            flags_var_split = flags_var_string.split('\x1f');
+            &mut flags_var_split
+        } else if let Some(rustflags) = env::var_os("RUSTFLAGS") {
+            flags_var = rustflags;
+            flags_var_string = flags_var.to_string_lossy();
+            flags_var_split = flags_var_string.split(' ');
+            &mut flags_var_split
+        } else {
+            flags_none = iter::empty();
+            &mut flags_none
+        };
+
+    for mut flag in flags {
+        if flag.starts_with("-Z") {
+            flag = &flag["-Z".len()..];
+        }
+        if flag.starts_with("allow-features=") {
+            flag = &flag["allow-features=".len()..];
+            return flag.split(',').any(|allowed| allowed == feature);
         }
     }
 
diff --git a/src/lib.rs b/src/lib.rs
index 52d01f2..d494ce8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -78,7 +78,7 @@
 //! a different thread.
 
 // Proc-macro2 types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.27")]
+#![doc(html_root_url = "https://docs.rs/proc-macro2/1.0.28")]
 #![cfg_attr(any(proc_macro_span, super_unstable), feature(proc_macro_span))]
 #![cfg_attr(super_unstable, feature(proc_macro_raw_ident, proc_macro_def_site))]
 #![cfg_attr(doc_cfg, feature(doc_cfg))]
diff --git a/src/parse.rs b/src/parse.rs
index 13a05a8..eddb490 100644
--- a/src/parse.rs
+++ b/src/parse.rs
@@ -461,7 +461,7 @@
 fn raw_string(input: Cursor) -> Result<Cursor, Reject> {
     let mut chars = input.char_indices();
     let mut n = 0;
-    while let Some((i, ch)) = chars.next() {
+    for (i, ch) in &mut chars {
         match ch {
             '"' => {
                 n = i;