Snap for 11399958 from 8f6ade9b672878674254a4225e81db1b480a6089 to 24Q2-release

Change-Id: I5fc7bd2391555f764b3f8f815ede3756fb862e85
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index a26ab5a..b8aa055 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "44d758d558c62bf08bfdef49159f30fe37a8c101"
+    "sha1": "1e0cc1025af5388397c67fa4389ad7ad24814df8"
   },
   "path_in_vcs": ""
 }
\ No newline at end of file
diff --git a/.clippy.toml b/.clippy.toml
deleted file mode 100644
index 3d30690..0000000
--- a/.clippy.toml
+++ /dev/null
@@ -1 +0,0 @@
-msrv = "1.31.0"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ab5c1fd..3b40719 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,6 +3,7 @@
 on:
   push:
   pull_request:
+  workflow_dispatch:
   schedule: [cron: "40 1 * * *"]
 
 permissions:
@@ -12,8 +13,13 @@
   RUSTFLAGS: -Dwarnings
 
 jobs:
+  pre_ci:
+    uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
+
   test:
     name: Rust ${{matrix.rust}}
+    needs: pre_ci
+    if: needs.pre_ci.outputs.continue
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
@@ -25,10 +31,15 @@
       - uses: dtolnay/rust-toolchain@master
         with:
           toolchain: ${{matrix.rust}}
+      - name: Enable type layout randomization
+        run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
+        if: matrix.rust == 'nightly'
       - run: cargo test
 
   msrv:
     name: Rust 1.31.0
+    needs: pre_ci
+    if: needs.pre_ci.outputs.continue
     runs-on: ubuntu-latest
     timeout-minutes: 45
     steps:
@@ -36,16 +47,6 @@
       - uses: dtolnay/[email protected]
       - run: cargo check
 
-  minimal:
-    name: Minimal versions
-    runs-on: ubuntu-latest
-    timeout-minutes: 45
-    steps:
-      - uses: actions/checkout@v3
-      - uses: dtolnay/rust-toolchain@nightly
-      - run: cargo -Z minimal-versions generate-lockfile
-      - run: cargo check --locked
-
   clippy:
     name: Clippy
     runs-on: ubuntu-latest
@@ -58,11 +59,14 @@
 
   miri:
     name: Miri
+    needs: pre_ci
+    if: needs.pre_ci.outputs.continue
     runs-on: ubuntu-latest
     timeout-minutes: 45
     steps:
       - uses: actions/checkout@v3
       - uses: dtolnay/rust-toolchain@miri
+      - run: cargo miri setup
       - run: cargo miri test
         env:
           MIRIFLAGS: -Zmiri-strict-provenance
diff --git a/Android.bp b/Android.bp
index 0263ee4..927159d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,7 @@
     name: "libpaste",
     crate_name: "paste",
     cargo_env_compat: true,
-    cargo_pkg_version: "1.0.11",
+    cargo_pkg_version: "1.0.14",
     srcs: ["src/lib.rs"],
     edition: "2018",
 }
diff --git a/Cargo.toml b/Cargo.toml
index 091af69..f086ac3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 edition = "2018"
 rust-version = "1.31"
 name = "paste"
-version = "1.0.11"
+version = "1.0.14"
 authors = ["David Tolnay <[email protected]>"]
 description = "Macros for all your token pasting needs"
 readme = "README.md"
@@ -21,11 +21,13 @@
 categories = [
     "development-tools",
     "no-std",
+    "no-std::no-alloc",
 ]
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/dtolnay/paste"
 
 [package.metadata.docs.rs]
+rustdoc-args = ["--generate-link-to-definition"]
 targets = ["x86_64-unknown-linux-gnu"]
 
 [lib]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 179c506..8a8a99e 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,8 +1,8 @@
 [package]
 name = "paste"
-version = "1.0.11"
+version = "1.0.14"
 authors = ["David Tolnay <[email protected]>"]
-categories = ["development-tools", "no-std"]
+categories = ["development-tools", "no-std", "no-std::no-alloc"]
 description = "Macros for all your token pasting needs"
 edition = "2018"
 keywords = ["macros"]
@@ -20,3 +20,4 @@
 
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
+rustdoc-args = ["--generate-link-to-definition"]
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
index 16fe87b..1b5ec8b 100644
--- a/LICENSE-APACHE
+++ b/LICENSE-APACHE
@@ -174,28 +174,3 @@
    of your accepting any such warranty or additional liability.
 
 END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/METADATA b/METADATA
index 665788d..d216d0a 100644
--- a/METADATA
+++ b/METADATA
@@ -1,23 +1,20 @@
 # This project was upgraded with external_updater.
-# Usage: tools/external_updater/updater.sh update rust/crates/paste
-# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+# Usage: tools/external_updater/updater.sh update external/rust/crates/paste
+# For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md
 
 name: "paste"
 description: "Macros for all your token pasting needs"
 third_party {
-  url {
-    type: HOMEPAGE
-    value: "https://crates.io/crates/paste"
-  }
-  url {
-    type: ARCHIVE
-    value: "https://static.crates.io/crates/paste/paste-1.0.11.crate"
-  }
-  version: "1.0.11"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2023
+    year: 2024
     month: 2
-    day: 3
+    day: 2
+  }
+  homepage: "https://crates.io/crates/paste"
+  identifier {
+    type: "Archive"
+    value: "https://static.crates.io/crates/paste/paste-1.0.14.crate"
+    version: "1.0.14"
   }
 }
diff --git a/src/lib.rs b/src/lib.rs
index 80c1b98..70830e4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -137,6 +137,7 @@
 //! method_new!(Paste);  // expands to #[doc = "Create a new `Paste` object"]
 //! ```
 
+#![doc(html_root_url = "https://docs.rs/paste/1.0.14")]
 #![allow(
     clippy::derive_partial_eq_without_eq,
     clippy::doc_markdown,
diff --git a/tests/test_attr.rs b/tests/test_attr.rs
index c880eac..6c49808 100644
--- a/tests/test_attr.rs
+++ b/tests/test_attr.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::let_underscore_untyped)]
+
 use paste::paste;
 use paste_test_suite::paste_test;
 
diff --git a/tests/test_doc.rs b/tests/test_doc.rs
index 2e2b14d..3dd66aa 100644
--- a/tests/test_doc.rs
+++ b/tests/test_doc.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::let_underscore_untyped)]
+
 use paste::paste;
 
 #[test]
diff --git a/tests/test_expr.rs b/tests/test_expr.rs
index 41d84ce..53cf67a 100644
--- a/tests/test_expr.rs
+++ b/tests/test_expr.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::let_underscore_untyped)]
+
 use paste::paste;
 
 #[test]
@@ -197,11 +199,11 @@
 mod test_x86_feature_literal {
     // work around https://github.com/rust-lang/rust/issues/72726
 
-    use paste::paste;
-
     #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
     macro_rules! my_is_x86_feature_detected {
         ($feat:literal) => {
+            use paste::paste;
+
             paste! {
                 #[test]
                 fn test() {
diff --git a/tests/test_item.rs b/tests/test_item.rs
index 3821510..b26b661 100644
--- a/tests/test_item.rs
+++ b/tests/test_item.rs
@@ -1,3 +1,5 @@
+#![allow(clippy::let_underscore_untyped)]
+
 mod test_basic {
     use paste::paste;
 
diff --git a/tests/ui/invalid-ident.stderr b/tests/ui/invalid-ident.stderr
index 28593fb..ca1585e 100644
--- a/tests/ui/invalid-ident.stderr
+++ b/tests/ui/invalid-ident.stderr
@@ -6,6 +6,11 @@
 5 | | }
   | |_^ expected identifier
   |
+help: identifiers cannot start with a number
+ --> tests/ui/invalid-ident.rs:3:1
+  |
+3 | paste! {
+  | ^
   = note: this error originates in the macro `paste` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: `"f\""` is not a valid identifier