[rust] Roll cxx to 1.0.57.

This rolls cxx, cxxbridge_cmd and cxxbridge_macro Rust dependencies from
1.0.56 to 1.0.57.

The only reason to do this is because they've taken one of our patches
upstream, so we can delete one of our .patch files and slightly unfork.

Procedure used:

* Cherry-pick patchset 60 of
  https://chromium-review.googlesource.com/c/chromium/src/+/3212915
* Delete third_party/rust/cxx/v1/crate
* Delete third_party/rust/cxxbridge_cmd/v1/crate
* Delete third_party/rust/cxxbridge_macro/v1/crate
* vpython3 tools/crates/crates.py download cxx 1.0 --security-critical no
* vpython3 tools/crates/crates.py download cxxbridge-macro 1.0 --security-critical no
* vpython3 tools/crates/crates.py download cxxbridge-cmd 1.0 --security-critical no
* Reapply all patches from third_party/rust/{each of the three crates}/v1/patches
* vpython3 tools/crates/crates.py gen (didn't make any changes)

This CL also:
* Deletes one of the patch files form
  third_party/rust/cxxbridge_cmd/v1/patches, because that patch has now
  been accepted upstream.
* Renames one of the other patch files which was badly named.

Change-Id: I2aa9f9ef49ab6c3a2b559b32da5e0b87a5c422f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3314392
Reviewed-by: Ɓukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#948061}
diff --git a/third_party/rust/cxx/v1/README.chromium b/third_party/rust/cxx/v1/README.chromium
index 53bdc99..0aff9cc5 100644
--- a/third_party/rust/cxx/v1/README.chromium
+++ b/third_party/rust/cxx/v1/README.chromium
@@ -1,6 +1,6 @@
 Name: cxx
 URL: https://crates.io/crates/cxx
 Description: Safe interop between Rust and C++
-Version: 1.0.56
+Version: 1.0.57
 Security Critical: no
 License: Apache 2.0
diff --git a/third_party/rust/cxx/v1/crate/.bazelrc b/third_party/rust/cxx/v1/crate/.bazelrc
new file mode 100644
index 0000000..6ffa81e5
--- /dev/null
+++ b/third_party/rust/cxx/v1/crate/.bazelrc
@@ -0,0 +1 @@
+build --@rules_rust//:extra_rustc_flags=-Clink-arg=-fuse-ld=lld
diff --git a/third_party/rust/cxx/v1/crate/.cargo_vcs_info.json b/third_party/rust/cxx/v1/crate/.cargo_vcs_info.json
index 1cbe1a7b..fb842460 100644
--- a/third_party/rust/cxx/v1/crate/.cargo_vcs_info.json
+++ b/third_party/rust/cxx/v1/crate/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "4c4987390a70ea063e90f0b4580fab35fa45a7d2"
+    "sha1": "0854ef70c0c31f1f2efb883d51e1b1db30eacd33"
   },
   "path_in_vcs": ""
 }
\ No newline at end of file
diff --git a/third_party/rust/cxx/v1/crate/.github/workflows/ci.yml b/third_party/rust/cxx/v1/crate/.github/workflows/ci.yml
index 0b82cd99..d762976 100644
--- a/third_party/rust/cxx/v1/crate/.github/workflows/ci.yml
+++ b/third_party/rust/cxx/v1/crate/.github/workflows/ci.yml
@@ -90,6 +90,8 @@
           chmod +x install.sh
           ./install.sh --user
           echo $HOME/bin >> $GITHUB_PATH
+      - name: Install lld
+        run: sudo apt-get install lld
       - run: bazel run demo --verbose_failures --noshow_progress
       - run: bazel test ... --verbose_failures --noshow_progress
 
@@ -112,3 +114,12 @@
         run: sudo apt-get install clang-tidy-11
       - name: Run clang-tidy
         run: clang-tidy-11 src/cxx.cc --warnings-as-errors=*
+
+  outdated:
+    name: Outdated
+    runs-on: ubuntu-latest
+    if: github.event_name != 'pull_request'
+    steps:
+      - uses: actions/checkout@v2
+      - uses: dtolnay/install@cargo-outdated
+      - run: cargo outdated --exit-code 1
diff --git a/third_party/rust/cxx/v1/crate/BUILD b/third_party/rust/cxx/v1/crate/BUILD
index c2c2edfd..8381560 100644
--- a/third_party/rust/cxx/v1/crate/BUILD
+++ b/third_party/rust/cxx/v1/crate/BUILD
@@ -1,5 +1,5 @@
 load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library")
+load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_proc_macro")
 
 rust_library(
     name = "cxx",
@@ -39,10 +39,9 @@
     hdrs = ["include/cxx.h"],
 )
 
-rust_library(
+rust_proc_macro(
     name = "cxxbridge-macro",
     srcs = glob(["macro/src/**"]),
-    crate_type = "proc-macro",
     deps = [
         "//third-party:proc-macro2",
         "//third-party:quote",
diff --git a/third_party/rust/cxx/v1/crate/Cargo.toml b/third_party/rust/cxx/v1/crate/Cargo.toml
index 858222d..27d7a519 100644
--- a/third_party/rust/cxx/v1/crate/Cargo.toml
+++ b/third_party/rust/cxx/v1/crate/Cargo.toml
@@ -13,7 +13,7 @@
 edition = "2018"
 rust-version = "1.48"
 name = "cxx"
-version = "1.0.56"
+version = "1.0.57"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 links = "cxxbridge1"
 exclude = ["/demo", "/gen", "/syntax", "/third-party"]
@@ -28,12 +28,12 @@
 [package.metadata.docs.rs]
 targets = ["x86_64-unknown-linux-gnu"]
 [dependencies.cxxbridge-macro]
-version = "=1.0.56"
+version = "=1.0.57"
 
 [dependencies.link-cplusplus]
 version = "1.0"
 [dev-dependencies.cxx-build]
-version = "=1.0.56"
+version = "=1.0.57"
 
 [dev-dependencies.cxx-gen]
 version = "0.7"
@@ -45,14 +45,14 @@
 version = "1.0"
 
 [dev-dependencies.trybuild]
-version = "1.0.33"
+version = "1.0.52"
 features = ["diff"]
 # Removed for Chromium build.
 #[build-dependencies.cc]
 #version = "1.0.49"
 #
 #[build-dependencies.cxxbridge-flags]
-#version = "=1.0.56"
+#version = "=1.0.57"
 #default-features = false
 #
 #[features]
diff --git a/third_party/rust/cxx/v1/crate/Cargo.toml.orig b/third_party/rust/cxx/v1/crate/Cargo.toml.orig
index fa050c3..29c4444 100644
--- a/third_party/rust/cxx/v1/crate/Cargo.toml.orig
+++ b/third_party/rust/cxx/v1/crate/Cargo.toml.orig
@@ -1,47 +1,61 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# 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.
+#
+# 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]
-name = "cxx"
-version = "1.0.56" # remember to update html_root_url
-authors = ["David Tolnay <dtolnay@gmail.com>"]
 edition = "2018"
 rust-version = "1.48"
+name = "cxx"
+version = "1.0.57"
+authors = ["David Tolnay <dtolnay@gmail.com>"]
 links = "cxxbridge1"
-license = "MIT OR Apache-2.0"
-description = "Safe interop between Rust and C++"
-repository = "https://github.com/dtolnay/cxx"
-documentation = "https://docs.rs/cxx"
-homepage = "https://cxx.rs"
-readme = "README.md"
 exclude = ["/demo", "/gen", "/syntax", "/third-party"]
+description = "Safe interop between Rust and C++"
+homepage = "https://cxx.rs"
+documentation = "https://docs.rs/cxx"
+readme = "README.md"
 keywords = ["ffi"]
 categories = ["development-tools::ffi", "api-bindings"]
+license = "MIT OR Apache-2.0"
+repository = "https://github.com/dtolnay/cxx"
+[package.metadata.docs.rs]
+targets = ["x86_64-unknown-linux-gnu"]
+[dependencies.cxxbridge-macro]
+version = "=1.0.57"
+
+[dependencies.link-cplusplus]
+version = "1.0"
+[dev-dependencies.cxx-build]
+version = "=1.0.57"
+
+[dev-dependencies.cxx-gen]
+version = "0.7"
+
+[dev-dependencies.cxx-test-suite]
+version = "0"
+
+[dev-dependencies.rustversion]
+version = "1.0"
+
+[dev-dependencies.trybuild]
+version = "1.0.52"
+features = ["diff"]
+[build-dependencies.cc]
+version = "1.0.49"
+
+[build-dependencies.cxxbridge-flags]
+version = "=1.0.57"
+default-features = false
 
 [features]
-default = ["cxxbridge-flags/default"] # c++11
 "c++14" = ["cxxbridge-flags/c++14"]
 "c++17" = ["cxxbridge-flags/c++17"]
 "c++20" = ["cxxbridge-flags/c++20"]
-
-[dependencies]
-cxxbridge-macro = { version = "=1.0.56", path = "macro" }
-link-cplusplus = "1.0"
-
-[build-dependencies]
-cc = "1.0.49"
-cxxbridge-flags = { version = "=1.0.56", path = "flags", default-features = false }
-
-[dev-dependencies]
-cxx-build = { version = "=1.0.56", path = "gen/build" }
-cxx-gen = { version = "0.7", path = "gen/lib" }
-cxx-test-suite = { version = "0", path = "tests/ffi" }
-rustversion = "1.0"
-trybuild = { version = "1.0.33", features = ["diff"] }
-
-[workspace]
-members = ["demo", "flags", "gen/build", "gen/cmd", "gen/lib", "macro", "tests/ffi"]
-
-[package.metadata.docs.rs]
-targets = ["x86_64-unknown-linux-gnu"]
-
-[patch.crates-io]
-cxx = { path = "." }
-cxx-build = { path = "gen/build" }
+default = ["cxxbridge-flags/default"]
diff --git a/third_party/rust/cxx/v1/crate/WORKSPACE b/third_party/rust/cxx/v1/crate/WORKSPACE
index 08aacf21..85ebf7f 100644
--- a/third_party/rust/cxx/v1/crate/WORKSPACE
+++ b/third_party/rust/cxx/v1/crate/WORKSPACE
@@ -4,17 +4,17 @@
 
 http_archive(
     name = "rules_rust",
-    sha256 = "697a6f4f2adbd1b00f792346d6eca4cd45f691be63069c7d7ebf4fcf82a377a8",
-    strip_prefix = "rules_rust-8bad4c5e4e53d9f6f8d4d5228e26a44d92f37ab2",
+    sha256 = "4d6aa4554eaf5c7bf6da1dd1371b1455b3234676b234a299791635c50c61df91",
+    strip_prefix = "rules_rust-238b998f108a099e5a227dbe312526406dda1f2d",
     urls = [
-        # Master branch as of 2021-04-11
-        "https://github.com/bazelbuild/rules_rust/archive/8bad4c5e4e53d9f6f8d4d5228e26a44d92f37ab2.tar.gz",
+        # Main branch as of 2021-10-01
+        "https://github.com/bazelbuild/rules_rust/archive/238b998f108a099e5a227dbe312526406dda1f2d.tar.gz",
     ],
 )
 
 load("@rules_rust//rust:repositories.bzl", "rust_repositories")
 
-RUST_VERSION = "1.54.0"
+RUST_VERSION = "1.55.0"
 
 rust_repositories(
     edition = "2018",
diff --git a/third_party/rust/cxx/v1/crate/book/src/build/bazel.md b/third_party/rust/cxx/v1/crate/book/src/build/bazel.md
index 8f91055..6a2c82b 100644
--- a/third_party/rust/cxx/v1/crate/book/src/build/bazel.md
+++ b/third_party/rust/cxx/v1/crate/book/src/build/bazel.md
@@ -70,7 +70,7 @@
 # demo/BUILD
 
 load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_rust//rust:rust.bzl", "rust_binary")
+load("@rules_rust//rust:defs.bzl", "rust_binary")
 load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")
 
 rust_binary(
diff --git a/third_party/rust/cxx/v1/crate/book/theme/head.hbs b/third_party/rust/cxx/v1/crate/book/theme/head.hbs
new file mode 100644
index 0000000..4210276b
--- /dev/null
+++ b/third_party/rust/cxx/v1/crate/book/theme/head.hbs
@@ -0,0 +1,7 @@
+        <script async src="https://www.googletagmanager.com/gtag/js?id=G-DG41MK6DDN"></script>
+        <script>
+          window.dataLayer = window.dataLayer || [];
+          function gtag(){dataLayer.push(arguments);}
+          gtag('js', new Date());
+          gtag('config', 'G-DG41MK6DDN', {'anonymize_ip': true});
+        </script>
diff --git a/third_party/rust/cxx/v1/crate/src/lib.rs b/third_party/rust/cxx/v1/crate/src/lib.rs
index 702dc5b..67d80d6 100644
--- a/third_party/rust/cxx/v1/crate/src/lib.rs
+++ b/third_party/rust/cxx/v1/crate/src/lib.rs
@@ -364,7 +364,7 @@
 //! </table>
 
 #![no_std]
-#![doc(html_root_url = "https://docs.rs/cxx/1.0.56")]
+#![doc(html_root_url = "https://docs.rs/cxx/1.0.57")]
 #![deny(improper_ctypes, improper_ctypes_definitions, missing_docs)]
 #![cfg_attr(not(no_unsafe_op_in_unsafe_fn_lint), deny(unsafe_op_in_unsafe_fn))]
 #![cfg_attr(no_unsafe_op_in_unsafe_fn_lint, allow(unused_unsafe))]
diff --git a/third_party/rust/cxx/v1/crate/tests/BUILD b/third_party/rust/cxx/v1/crate/tests/BUILD
index d4af3af..4803e13b 100644
--- a/third_party/rust/cxx/v1/crate/tests/BUILD
+++ b/third_party/rust/cxx/v1/crate/tests/BUILD
@@ -1,5 +1,5 @@
 load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")
+load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
 load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")
 
 rust_test(
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/array_len_expr.stderr b/third_party/rust/cxx/v1/crate/tests/ui/array_len_expr.stderr
index 4b45a0b..c58cfbc 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/array_len_expr.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/array_len_expr.stderr
@@ -1,17 +1,17 @@
 error: array length must be an integer literal
- --> $DIR/array_len_expr.rs:4:28
+ --> tests/ui/array_len_expr.rs:4:28
   |
 4 |         arraystr: [String; "13"],
   |                            ^^^^
 
 error: unsupported expression, array length must be an integer literal
- --> $DIR/array_len_expr.rs:5:28
+ --> tests/ui/array_len_expr.rs:5:28
   |
 5 |         arraysub: [String; 15 - 1],
   |                            ^^^^^^
 
 error: array with zero size is not supported
- --> $DIR/array_len_expr.rs:6:20
+ --> tests/ui/array_len_expr.rs:6:20
   |
 6 |         arrayzero: [String; 0],
   |                    ^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/array_len_suffix.stderr b/third_party/rust/cxx/v1/crate/tests/ui/array_len_suffix.stderr
index 143bcb0..1dde790 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/array_len_suffix.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/array_len_suffix.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
- --> $DIR/array_len_suffix.rs:4:32
+ --> tests/ui/array_len_suffix.rs:4:32
   |
 4 |         fn array() -> [String; 12u16];
   |                                ^^^^^ expected `usize`, found `u16`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/async_fn.stderr b/third_party/rust/cxx/v1/crate/tests/ui/async_fn.stderr
index dedec7b..09b4dc0 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/async_fn.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/async_fn.stderr
@@ -1,5 +1,5 @@
 error: async function is not directly supported yet, but see https://cxx.rs/async.html for a working approach
- --> $DIR/async_fn.rs:4:9
+ --> tests/ui/async_fn.rs:4:9
   |
 4 |         async fn f();
   |         ^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/bad_explicit_impl.stderr b/third_party/rust/cxx/v1/crate/tests/ui/bad_explicit_impl.stderr
index cd0a317..c4748f4 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/bad_explicit_impl.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/bad_explicit_impl.stderr
@@ -1,5 +1,5 @@
 error: unsupported Self type of explicit impl
- --> $DIR/bad_explicit_impl.rs:7:5
+ --> tests/ui/bad_explicit_impl.rs:7:5
   |
 7 |     impl fn() -> &S {}
   |     ^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/by_value_not_supported.stderr b/third_party/rust/cxx/v1/crate/tests/ui/by_value_not_supported.stderr
index 7288c93b..254c7bb4 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/by_value_not_supported.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/by_value_not_supported.stderr
@@ -1,59 +1,59 @@
 error: using opaque C++ type by value is not supported
- --> $DIR/by_value_not_supported.rs:4:9
+ --> tests/ui/by_value_not_supported.rs:4:9
   |
 4 |         c: C,
   |         ^^^^
 
 error: using opaque Rust type by value is not supported
- --> $DIR/by_value_not_supported.rs:5:9
+ --> tests/ui/by_value_not_supported.rs:5:9
   |
 5 |         r: R,
   |         ^^^^
 
 error: using C++ string by value is not supported
- --> $DIR/by_value_not_supported.rs:6:9
+ --> tests/ui/by_value_not_supported.rs:6:9
   |
 6 |         s: CxxString,
   |         ^^^^^^^^^^^^
 
 error: needs a cxx::ExternType impl in order to be used as a field of `S`, argument of `f` or return value of `f`
-  --> $DIR/by_value_not_supported.rs:10:9
+  --> tests/ui/by_value_not_supported.rs:10:9
    |
 10 |         type C;
    |         ^^^^^^
 
 error: passing opaque C++ type by value is not supported
-  --> $DIR/by_value_not_supported.rs:16:14
+  --> tests/ui/by_value_not_supported.rs:16:14
    |
 16 |         fn f(c: C) -> C;
    |              ^^^^
 
 error: returning opaque C++ type by value is not supported
-  --> $DIR/by_value_not_supported.rs:16:23
+  --> tests/ui/by_value_not_supported.rs:16:23
    |
 16 |         fn f(c: C) -> C;
    |                       ^
 
 error: passing opaque Rust type by value is not supported
-  --> $DIR/by_value_not_supported.rs:17:14
+  --> tests/ui/by_value_not_supported.rs:17:14
    |
 17 |         fn g(r: R) -> R;
    |              ^^^^
 
 error: returning opaque Rust type by value is not supported
-  --> $DIR/by_value_not_supported.rs:17:23
+  --> tests/ui/by_value_not_supported.rs:17:23
    |
 17 |         fn g(r: R) -> R;
    |                       ^
 
 error: passing C++ string by value is not supported
-  --> $DIR/by_value_not_supported.rs:18:14
+  --> tests/ui/by_value_not_supported.rs:18:14
    |
 18 |         fn h(s: CxxString) -> CxxString;
    |              ^^^^^^^^^^^^
 
 error: returning C++ string by value is not supported
-  --> $DIR/by_value_not_supported.rs:18:31
+  --> tests/ui/by_value_not_supported.rs:18:31
    |
 18 |         fn h(s: CxxString) -> CxxString;
    |                               ^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/const_fn.stderr b/third_party/rust/cxx/v1/crate/tests/ui/const_fn.stderr
index a62ca837..2dd6608 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/const_fn.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/const_fn.stderr
@@ -1,5 +1,5 @@
 error: const extern function is not supported
- --> $DIR/const_fn.rs:4:9
+ --> tests/ui/const_fn.rs:4:9
   |
 4 |         const fn f();
   |         ^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/data_enums.stderr b/third_party/rust/cxx/v1/crate/tests/ui/data_enums.stderr
index c78bce5..d8aa09e3 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/data_enums.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/data_enums.stderr
@@ -1,5 +1,5 @@
 error: enums with data are not supported yet
- --> $DIR/data_enums.rs:4:9
+ --> tests/ui/data_enums.rs:4:9
   |
 4 |         Field(u64),
   |         ^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/deny_missing_docs.stderr b/third_party/rust/cxx/v1/crate/tests/ui/deny_missing_docs.stderr
index e7aadfbe..8f4c191d 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/deny_missing_docs.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/deny_missing_docs.stderr
@@ -1,47 +1,47 @@
 error: missing documentation for a struct
-  --> $DIR/deny_missing_docs.rs:11:5
+  --> tests/ui/deny_missing_docs.rs:11:5
    |
 11 |     pub struct UndocumentedStruct {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/deny_missing_docs.rs:6:9
+  --> tests/ui/deny_missing_docs.rs:6:9
    |
 6  | #![deny(missing_docs)]
    |         ^^^^^^^^^^^^
 
 error: missing documentation for a struct field
-  --> $DIR/deny_missing_docs.rs:12:9
+  --> tests/ui/deny_missing_docs.rs:12:9
    |
 12 |         pub undocumented_field: u8,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a struct
-  --> $DIR/deny_missing_docs.rs:21:5
+  --> tests/ui/deny_missing_docs.rs:21:5
    |
 21 |     pub enum UndocumentedEnum {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated constant
-  --> $DIR/deny_missing_docs.rs:22:9
+  --> tests/ui/deny_missing_docs.rs:22:9
    |
 22 |         UndocumentedVariant = 0,
    |         ^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a struct
-  --> $DIR/deny_missing_docs.rs:44:9
+  --> tests/ui/deny_missing_docs.rs:44:9
    |
 44 |         pub type UndocumentedForeignType;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a type alias
-  --> $DIR/deny_missing_docs.rs:49:9
+  --> tests/ui/deny_missing_docs.rs:49:9
    |
 49 |         pub type UndocumentedTypeAlias = crate::bindgen::UndocumentedTypeAlias;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/deny_missing_docs.rs:54:9
+  --> tests/ui/deny_missing_docs.rs:54:9
    |
 54 |         pub fn undocumented_foreign_fn() -> u8;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/derive_duplicate.stderr b/third_party/rust/cxx/v1/crate/tests/ui/derive_duplicate.stderr
index ce27163..3368305 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/derive_duplicate.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/derive_duplicate.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `ffi::Struct`
- --> $DIR/derive_duplicate.rs:3:21
+ --> tests/ui/derive_duplicate.rs:3:21
   |
 3 |     #[derive(Clone, Clone)]
   |              -----  ^^^^^ conflicting implementation for `ffi::Struct`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/derive_noncopy.stderr b/third_party/rust/cxx/v1/crate/tests/ui/derive_noncopy.stderr
index d6410280..3e17d42 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/derive_noncopy.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/derive_noncopy.stderr
@@ -1,5 +1,5 @@
 error[E0204]: the trait `Copy` may not be implemented for this type
- --> $DIR/derive_noncopy.rs:3:14
+ --> tests/ui/derive_noncopy.rs:3:14
   |
 3 |     #[derive(Copy)]
   |              ^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/drop_shared.stderr b/third_party/rust/cxx/v1/crate/tests/ui/drop_shared.stderr
index f2724e35..e8911ca 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/drop_shared.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/drop_shared.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `ffi::_::forbid::Drop` for type `ffi::Shared`
- --> $DIR/drop_shared.rs:3:5
+ --> tests/ui/drop_shared.rs:3:5
   |
 1 | #[cxx::bridge]
   | -------------- first implementation here
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/empty_enum.stderr b/third_party/rust/cxx/v1/crate/tests/ui/empty_enum.stderr
index 0556da9..60d3b5d 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/empty_enum.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/empty_enum.stderr
@@ -1,5 +1,5 @@
 error: explicit #[repr(...)] is required for enum without any variants
- --> $DIR/empty_enum.rs:3:5
+ --> tests/ui/empty_enum.rs:3:5
   |
 3 |     enum A {}
   |     ^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/empty_struct.stderr b/third_party/rust/cxx/v1/crate/tests/ui/empty_struct.stderr
index 612476b..f6fbfc1 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/empty_struct.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/empty_struct.stderr
@@ -1,5 +1,5 @@
 error: structs without any fields are not supported
- --> $DIR/empty_struct.rs:3:5
+ --> tests/ui/empty_struct.rs:3:5
   |
 3 |     struct Empty {}
   |     ^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_inconsistent.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_inconsistent.stderr
index c5b427a8..d6d7837 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_inconsistent.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_inconsistent.stderr
@@ -1,5 +1,5 @@
 error: expected u16, found i64
- --> $DIR/enum_inconsistent.rs:5:9
+ --> tests/ui/enum_inconsistent.rs:5:9
   |
 5 |         B = 2i64,
   |         ^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_match_without_wildcard.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_match_without_wildcard.stderr
index f43678f7..033c2c9f 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_match_without_wildcard.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_match_without_wildcard.stderr
@@ -1,5 +1,5 @@
 error[E0004]: non-exhaustive patterns: `A { repr: 2_u8..=u8::MAX }` not covered
-  --> $DIR/enum_match_without_wildcard.rs:12:11
+  --> tests/ui/enum_match_without_wildcard.rs:12:11
    |
 3  |     enum A {
    |     ------ `ffi::A` defined here
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_out_of_bounds.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_out_of_bounds.stderr
index 5d02e2063..3244b6a 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_out_of_bounds.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_out_of_bounds.stderr
@@ -1,11 +1,11 @@
 error: discriminant value `18446744073709551615` is outside the limits of u32
- --> $DIR/enum_out_of_bounds.rs:5:9
+ --> tests/ui/enum_out_of_bounds.rs:5:9
   |
 5 |         A = 0xFFFF_FFFF_FFFF_FFFF,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: discriminant value `2000` is outside the limits of u8
- --> $DIR/enum_out_of_bounds.rs:9:9
+ --> tests/ui/enum_out_of_bounds.rs:9:9
   |
 9 |         B = 1u8,
   |         ^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_overflows.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_overflows.stderr
index ed58b61..76c37bb0 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_overflows.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_overflows.stderr
@@ -1,5 +1,5 @@
 error: discriminant overflow on value after 18446744073709551615
-  --> $DIR/enum_overflows.rs:13:9
+  --> tests/ui/enum_overflows.rs:13:9
    |
 13 |         F,
    |         ^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_receiver.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_receiver.stderr
index e09b4e39..ace7677 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_receiver.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_receiver.stderr
@@ -1,5 +1,5 @@
 error: unsupported receiver type; C++ does not allow member functions on enums
- --> $DIR/enum_receiver.rs:7:20
+ --> tests/ui/enum_receiver.rs:7:20
   |
 7 |         fn f(self: &Enum);
   |                    ^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/enum_unsatisfiable.stderr b/third_party/rust/cxx/v1/crate/tests/ui/enum_unsatisfiable.stderr
index 99852ca..e2b37bd 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/enum_unsatisfiable.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/enum_unsatisfiable.stderr
@@ -1,5 +1,5 @@
 error: these discriminant values do not fit in any supported enum repr type
- --> $DIR/enum_unsatisfiable.rs:3:5
+ --> tests/ui/enum_unsatisfiable.rs:3:5
   |
 3 | /     enum Bad {
 4 | |         A = -0xFFFF_FFFF_FFFF_FFFF,
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/expected_named.stderr b/third_party/rust/cxx/v1/crate/tests/ui/expected_named.stderr
index dab3b5a..33e2e0b 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/expected_named.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/expected_named.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
- --> $DIR/expected_named.rs:5:36
+ --> tests/ui/expected_named.rs:5:36
   |
 5 |         fn borrowed() -> UniquePtr<Borrowed>;
   |                                    ^^^^^^^^ expected named lifetime parameter
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/extern_fn_abi.stderr b/third_party/rust/cxx/v1/crate/tests/ui/extern_fn_abi.stderr
index 3abf47a..32ef9c3 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/extern_fn_abi.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/extern_fn_abi.stderr
@@ -1,5 +1,5 @@
 error: explicit ABI on extern function is not supported
- --> $DIR/extern_fn_abi.rs:4:9
+ --> tests/ui/extern_fn_abi.rs:4:9
   |
 4 |         extern "Java" fn f();
   |         ^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_bound.stderr b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_bound.stderr
index ca07ef7..1d6796b 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_bound.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_bound.stderr
@@ -1,11 +1,11 @@
 error: extern type bounds are not implemented yet
- --> $DIR/extern_type_bound.rs:4:22
+ --> tests/ui/extern_type_bound.rs:4:22
   |
 4 |         type Opaque: PartialEq + PartialOrd;
   |                      ^^^^^^^^^^^^^^^^^^^^^^
 
 error: unsupported trait
-  --> $DIR/extern_type_bound.rs:11:22
+  --> tests/ui/extern_type_bound.rs:11:22
    |
 11 |         type Opaque: for<'de> Deserialize<'de>;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_generic.stderr b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_generic.stderr
index 95faec6..2b312f0 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_generic.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_generic.stderr
@@ -1,5 +1,5 @@
 error: extern type with generic type parameter is not supported yet
- --> $DIR/extern_type_generic.rs:4:22
+ --> tests/ui/extern_type_generic.rs:4:22
   |
 4 |         type Generic<T>;
   |                      ^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_lifetime_bound.stderr b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_lifetime_bound.stderr
index 8c58050..6c3fc7f 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/extern_type_lifetime_bound.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/extern_type_lifetime_bound.stderr
@@ -1,5 +1,5 @@
 error: lifetime parameter with bounds is not supported yet
- --> $DIR/extern_type_lifetime_bound.rs:4:26
+ --> tests/ui/extern_type_lifetime_bound.rs:4:26
   |
 4 |         type Complex<'a, 'b: 'a>;
   |                          ^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/fallible_fnptr.stderr b/third_party/rust/cxx/v1/crate/tests/ui/fallible_fnptr.stderr
index 1d3fbe42..4635ec8 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/fallible_fnptr.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/fallible_fnptr.stderr
@@ -1,5 +1,5 @@
 error: function pointer returning Result is not supported yet
- --> $DIR/fallible_fnptr.rs:4:24
+ --> tests/ui/fallible_fnptr.rs:4:24
   |
 4 |         fn f(callback: fn() -> Result<()>);
   |                        ^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/function_with_body.stderr b/third_party/rust/cxx/v1/crate/tests/ui/function_with_body.stderr
index c5641db8..f2078df 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/function_with_body.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/function_with_body.stderr
@@ -1,5 +1,5 @@
 error: expected `;`
- --> $DIR/function_with_body.rs:4:16
+ --> tests/ui/function_with_body.rs:4:16
   |
 4 |         fn f() {}
   |                ^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/generic_enum.stderr b/third_party/rust/cxx/v1/crate/tests/ui/generic_enum.stderr
index ea83d7c8..2529af7 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/generic_enum.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/generic_enum.stderr
@@ -1,17 +1,17 @@
 error: enum with generic parameters is not supported
- --> $DIR/generic_enum.rs:3:5
+ --> tests/ui/generic_enum.rs:3:5
   |
 3 |     enum A<T> {
   |     ^^^^^^^^^
 
 error: enum with generic parameters is not supported
- --> $DIR/generic_enum.rs:7:5
+ --> tests/ui/generic_enum.rs:7:5
   |
 7 |     enum B<T> where T: Copy {
   |     ^^^^^^^^^
 
 error: enum with where-clause is not supported
-  --> $DIR/generic_enum.rs:11:12
+  --> tests/ui/generic_enum.rs:11:12
    |
 11 |     enum C where void: Copy {
    |            ^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/impl_trait_for_type.stderr b/third_party/rust/cxx/v1/crate/tests/ui/impl_trait_for_type.stderr
index e05a461..fa99de5 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/impl_trait_for_type.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/impl_trait_for_type.stderr
@@ -1,5 +1,5 @@
 error: unexpected impl, expected something like `impl UniquePtr<T> {}`
- --> $DIR/impl_trait_for_type.rs:7:10
+ --> tests/ui/impl_trait_for_type.rs:7:10
   |
 7 |     impl UniquePtrTarget for S {}
   |          ^^^^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/include.stderr b/third_party/rust/cxx/v1/crate/tests/ui/include.stderr
index c85a83e..c1541c60 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/include.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/include.stderr
@@ -1,29 +1,29 @@
 error: unexpected token
- --> $DIR/include.rs:4:28
+ --> tests/ui/include.rs:4:28
   |
 4 |         include!("path/to" what);
   |                            ^^^^
 
 error: unexpected token
- --> $DIR/include.rs:5:28
+ --> tests/ui/include.rs:5:28
   |
 5 |         include!(<path/to> what);
   |                            ^^^^
 
 error: expected `>`
- --> $DIR/include.rs:6:17
+ --> tests/ui/include.rs:6:17
   |
 6 |         include!(<path/to);
   |                 ^^^^^^^^^^
 
 error: unexpected token in include path
- --> $DIR/include.rs:7:23
+ --> tests/ui/include.rs:7:23
   |
 7 |         include!(<path[to]>);
   |                       ^^^^
 
 error: expected "quoted/path/to" or <bracketed/path/to>
- --> $DIR/include.rs:8:18
+ --> tests/ui/include.rs:8:18
   |
 8 |         include!(...);
   |                  ^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_cxx.stderr b/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_cxx.stderr
index 099c6ce..a5cc3bd 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_cxx.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_cxx.stderr
@@ -1,5 +1,5 @@
 error: extern C++ function with lifetimes must be declared in `unsafe extern "C++"` block
- --> $DIR/lifetime_extern_cxx.rs:5:9
+ --> tests/ui/lifetime_extern_cxx.rs:5:9
   |
 5 |         unsafe fn f<'a>(&'a self, arg: &str) -> &'a str;
   |         ^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_rust.stderr b/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_rust.stderr
index 0fc806ad..b2ca495 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_rust.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/lifetime_extern_rust.stderr
@@ -1,5 +1,5 @@
 error: must be `unsafe fn f` in order to expose explicit lifetimes to C++
- --> $DIR/lifetime_extern_rust.rs:5:9
+ --> tests/ui/lifetime_extern_rust.rs:5:9
   |
 5 |         fn f<'a>(&'a self, arg: &str) -> &'a str;
   |         ^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/missing_unsafe.stderr b/third_party/rust/cxx/v1/crate/tests/ui/missing_unsafe.stderr
index df1bce2..263564ed 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/missing_unsafe.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/missing_unsafe.stderr
@@ -1,5 +1,5 @@
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
- --> $DIR/missing_unsafe.rs:4:12
+ --> tests/ui/missing_unsafe.rs:4:12
   |
 4 |         fn f(x: i32);
   |            ^ call to unsafe function
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/multiple_parse_error.stderr b/third_party/rust/cxx/v1/crate/tests/ui/multiple_parse_error.stderr
index f736fd1f1..32b8e560 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/multiple_parse_error.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/multiple_parse_error.stderr
@@ -1,11 +1,11 @@
 error: unit structs are not supported
- --> $DIR/multiple_parse_error.rs:3:5
+ --> tests/ui/multiple_parse_error.rs:3:5
   |
 3 |     struct Monad<T>;
   |     ^^^^^^^^^^^^^^^^
 
 error: unrecognized ABI, requires either "C++" or "Rust"
- --> $DIR/multiple_parse_error.rs:5:5
+ --> tests/ui/multiple_parse_error.rs:5:5
   |
 5 |     extern "Haskell" {}
   |     ^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/mut_return.stderr b/third_party/rust/cxx/v1/crate/tests/ui/mut_return.stderr
index e33393d..37e947a 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/mut_return.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/mut_return.stderr
@@ -1,11 +1,11 @@
 error: &mut return type is not allowed unless there is a &mut argument
-  --> $DIR/mut_return.rs:10:9
+  --> tests/ui/mut_return.rs:10:9
    |
 10 |         fn f(t: &Thing) -> Pin<&mut CxxString>;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: &mut return type is not allowed unless there is a &mut argument
-  --> $DIR/mut_return.rs:14:9
+  --> tests/ui/mut_return.rs:14:9
    |
 14 |         fn j(t: &Thing) -> &mut [u8];
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/non_integer_discriminant_enum.stderr b/third_party/rust/cxx/v1/crate/tests/ui/non_integer_discriminant_enum.stderr
index 926fd90..aa4388f 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/non_integer_discriminant_enum.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/non_integer_discriminant_enum.stderr
@@ -1,5 +1,5 @@
 error: enums with non-integer literal discriminants are not supported yet
- --> $DIR/non_integer_discriminant_enum.rs:4:9
+ --> tests/ui/non_integer_discriminant_enum.rs:4:9
   |
 4 |         Field = 2020 + 1,
   |         ^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/nonempty_impl_block.stderr b/third_party/rust/cxx/v1/crate/tests/ui/nonempty_impl_block.stderr
index e7881bb..6f69830 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/nonempty_impl_block.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/nonempty_impl_block.stderr
@@ -1,5 +1,5 @@
 error: expected an empty impl block
- --> $DIR/nonempty_impl_block.rs:7:23
+ --> tests/ui/nonempty_impl_block.rs:7:23
   |
 7 |       impl UniquePtr<S> {
   |  _______________________^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/nonlocal_rust_type.stderr b/third_party/rust/cxx/v1/crate/tests/ui/nonlocal_rust_type.stderr
index d266353..dc510d89 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/nonlocal_rust_type.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/nonlocal_rust_type.stderr
@@ -1,5 +1,5 @@
 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
-  --> $DIR/nonlocal_rust_type.rs:10:9
+  --> tests/ui/nonlocal_rust_type.rs:10:9
    |
 10 |         type OptBuilder<'a>;
    |         ^^^^^--------------
@@ -10,7 +10,7 @@
    = note: define and implement a trait or new type instead
 
 error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
-  --> $DIR/nonlocal_rust_type.rs:14:13
+  --> tests/ui/nonlocal_rust_type.rs:14:13
    |
 14 |         rs: Box<OptBuilder<'a>>,
    |             ^^^^---------------
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/opaque_autotraits.stderr b/third_party/rust/cxx/v1/crate/tests/ui/opaque_autotraits.stderr
index 15a2b64..01c8362 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/opaque_autotraits.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/opaque_autotraits.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `*const cxx::void` cannot be sent between threads safely
-  --> $DIR/opaque_autotraits.rs:13:5
+  --> tests/ui/opaque_autotraits.rs:13:5
    |
 13 |     assert_send::<ffi::Opaque>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely
@@ -8,18 +8,18 @@
    = note: required because it appears within the type `[*const cxx::void; 0]`
    = note: required because it appears within the type `cxx::private::Opaque`
 note: required because it appears within the type `ffi::Opaque`
-  --> $DIR/opaque_autotraits.rs:4:14
+  --> tests/ui/opaque_autotraits.rs:4:14
    |
 4  |         type Opaque;
    |              ^^^^^^
 note: required by a bound in `assert_send`
-  --> $DIR/opaque_autotraits.rs:8:19
+  --> tests/ui/opaque_autotraits.rs:8:19
    |
 8  | fn assert_send<T: Send>() {}
    |                   ^^^^ required by this bound in `assert_send`
 
 error[E0277]: `*const cxx::void` cannot be shared between threads safely
-  --> $DIR/opaque_autotraits.rs:14:5
+  --> tests/ui/opaque_autotraits.rs:14:5
    |
 14 |     assert_sync::<ffi::Opaque>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be shared between threads safely
@@ -28,18 +28,18 @@
    = note: required because it appears within the type `[*const cxx::void; 0]`
    = note: required because it appears within the type `cxx::private::Opaque`
 note: required because it appears within the type `ffi::Opaque`
-  --> $DIR/opaque_autotraits.rs:4:14
+  --> tests/ui/opaque_autotraits.rs:4:14
    |
 4  |         type Opaque;
    |              ^^^^^^
 note: required by a bound in `assert_sync`
-  --> $DIR/opaque_autotraits.rs:9:19
+  --> tests/ui/opaque_autotraits.rs:9:19
    |
 9  | fn assert_sync<T: Sync>() {}
    |                   ^^^^ required by this bound in `assert_sync`
 
 error[E0277]: `PhantomPinned` cannot be unpinned
-  --> $DIR/opaque_autotraits.rs:15:5
+  --> tests/ui/opaque_autotraits.rs:15:5
    |
 15 |     assert_unpin::<ffi::Opaque>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ffi::Opaque`, the trait `Unpin` is not implemented for `PhantomPinned`
@@ -48,12 +48,12 @@
    = note: required because it appears within the type `PhantomData<PhantomPinned>`
    = note: required because it appears within the type `cxx::private::Opaque`
 note: required because it appears within the type `ffi::Opaque`
-  --> $DIR/opaque_autotraits.rs:4:14
+  --> tests/ui/opaque_autotraits.rs:4:14
    |
 4  |         type Opaque;
    |              ^^^^^^
 note: required by a bound in `assert_unpin`
-  --> $DIR/opaque_autotraits.rs:10:20
+  --> tests/ui/opaque_autotraits.rs:10:20
    |
 10 | fn assert_unpin<T: Unpin>() {}
    |                    ^^^^^ required by this bound in `assert_unpin`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/opaque_not_sized.stderr b/third_party/rust/cxx/v1/crate/tests/ui/opaque_not_sized.stderr
index b50a269..85be4af 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/opaque_not_sized.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/opaque_not_sized.stderr
@@ -1,17 +1,17 @@
 error[E0277]: the size for values of type `str` cannot be known at compilation time
- --> $DIR/opaque_not_sized.rs:4:14
+ --> tests/ui/opaque_not_sized.rs:4:14
   |
 4 |         type TypeR;
   |              ^^^^^ doesn't have a size known at compile-time
   |
   = help: within `TypeR`, the trait `Sized` is not implemented for `str`
 note: required because it appears within the type `TypeR`
- --> $DIR/opaque_not_sized.rs:8:8
+ --> tests/ui/opaque_not_sized.rs:8:8
   |
 8 | struct TypeR(str);
   |        ^^^^^
 note: required by a bound in `__AssertSized`
- --> $DIR/opaque_not_sized.rs:4:9
+ --> tests/ui/opaque_not_sized.rs:4:9
   |
 4 |         type TypeR;
   |         ^^^^^^^^^^^ required by this bound in `__AssertSized`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/pin_mut_opaque.stderr b/third_party/rust/cxx/v1/crate/tests/ui/pin_mut_opaque.stderr
index 95af3cd..8a5e019 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/pin_mut_opaque.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/pin_mut_opaque.stderr
@@ -1,35 +1,35 @@
 error: mutable reference to C++ type requires a pin -- use Pin<&mut Opaque>
- --> $DIR/pin_mut_opaque.rs:5:19
+ --> tests/ui/pin_mut_opaque.rs:5:19
   |
 5 |         fn f(arg: &mut Opaque);
   |                   ^^^^^^^^^^^
 
 error: mutable reference to C++ type requires a pin -- use Pin<&mut CxxString>
- --> $DIR/pin_mut_opaque.rs:8:17
+ --> tests/ui/pin_mut_opaque.rs:8:17
   |
 8 |         fn s(s: &mut CxxString);
   |                 ^^^^^^^^^^^^^^
 
 error: mutable reference to C++ type requires a pin -- use Pin<&mut CxxVector<...>>
- --> $DIR/pin_mut_opaque.rs:9:17
+ --> tests/ui/pin_mut_opaque.rs:9:17
   |
 9 |         fn v(v: &mut CxxVector<u8>);
   |                 ^^^^^^^^^^^^^^^^^^
 
 error: needs a cxx::ExternType impl in order to be used as a non-pinned mutable reference in signature of `f`, `g`, `h`
- --> $DIR/pin_mut_opaque.rs:4:9
+ --> tests/ui/pin_mut_opaque.rs:4:9
   |
 4 |         type Opaque;
   |         ^^^^^^^^^^^
 
 error: mutable reference to opaque C++ type requires a pin -- use `self: Pin<&mut Opaque>`
- --> $DIR/pin_mut_opaque.rs:6:14
+ --> tests/ui/pin_mut_opaque.rs:6:14
   |
 6 |         fn g(&mut self);
   |              ^^^^^^^^^
 
 error: mutable reference to opaque C++ type requires a pin -- use `self: Pin<&mut Opaque>`
- --> $DIR/pin_mut_opaque.rs:7:20
+ --> tests/ui/pin_mut_opaque.rs:7:20
   |
 7 |         fn h(self: &mut Opaque);
   |                    ^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/ptr_in_fnptr.stderr b/third_party/rust/cxx/v1/crate/tests/ui/ptr_in_fnptr.stderr
index 372d4cd..f429b1bd 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/ptr_in_fnptr.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/ptr_in_fnptr.stderr
@@ -1,5 +1,5 @@
 error: pointer argument requires that the function pointer be marked unsafe
- --> $DIR/ptr_in_fnptr.rs:4:27
+ --> tests/ui/ptr_in_fnptr.rs:4:27
   |
 4 |         fn f(callback: fn(p: *const u8));
   |                           ^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/ptr_missing_unsafe.stderr b/third_party/rust/cxx/v1/crate/tests/ui/ptr_missing_unsafe.stderr
index 65f53a9..d65481b 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/ptr_missing_unsafe.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/ptr_missing_unsafe.stderr
@@ -1,5 +1,5 @@
 error: pointer argument requires that the function be marked unsafe
- --> $DIR/ptr_missing_unsafe.rs:6:27
+ --> tests/ui/ptr_missing_unsafe.rs:6:27
   |
 6 |         fn not_unsafe_ptr(c: *mut C);
   |                           ^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/ptr_no_const_mut.stderr b/third_party/rust/cxx/v1/crate/tests/ui/ptr_no_const_mut.stderr
index 8a391852..8402120 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/ptr_no_const_mut.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/ptr_no_const_mut.stderr
@@ -1,5 +1,5 @@
 error: expected mut or const in raw pointer type
- --> $DIR/ptr_no_const_mut.rs:6:43
+ --> tests/ui/ptr_no_const_mut.rs:6:43
   |
 6 |         fn get_neither_const_nor_mut() -> *C;
   |                                           ^ expected mut or const in raw pointer type
@@ -7,7 +7,7 @@
   = help: use `*mut T` or `*const T` as appropriate
 
 error: expected `const` or `mut`
- --> $DIR/ptr_no_const_mut.rs:6:44
+ --> tests/ui/ptr_no_const_mut.rs:6:44
   |
 6 |         fn get_neither_const_nor_mut() -> *C;
   |                                            ^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/ptr_unsupported.stderr b/third_party/rust/cxx/v1/crate/tests/ui/ptr_unsupported.stderr
index a3e9343..fd3f031 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/ptr_unsupported.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/ptr_unsupported.stderr
@@ -1,17 +1,17 @@
 error: C++ does not allow pointer to reference as a type
- --> $DIR/ptr_unsupported.rs:6:38
+ --> tests/ui/ptr_unsupported.rs:6:38
   |
 6 |         fn get_ptr_to_reference() -> *mut &C;
   |                                      ^^^^^^^
 
 error: unsupported unique_ptr target type
- --> $DIR/ptr_unsupported.rs:7:38
+ --> tests/ui/ptr_unsupported.rs:7:38
   |
 7 |         fn get_uniqueptr_to_ptr() -> UniquePtr<*mut C>;
   |                                      ^^^^^^^^^^^^^^^^^
 
 error: unsupported vector element type
- --> $DIR/ptr_unsupported.rs:8:45
+ --> tests/ui/ptr_unsupported.rs:8:45
   |
 8 |         fn get_vector_of_ptr() -> UniquePtr<CxxVector<*mut C>>;
   |                                             ^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/reference_to_reference.stderr b/third_party/rust/cxx/v1/crate/tests/ui/reference_to_reference.stderr
index d4069c1..765e4427 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/reference_to_reference.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/reference_to_reference.stderr
@@ -1,11 +1,11 @@
 error: C++ does not allow references to references
- --> $DIR/reference_to_reference.rs:5:23
+ --> tests/ui/reference_to_reference.rs:5:23
   |
 5 |         fn repro_c(t: &&ThingC);
   |                       ^^^^^^^^
 
 error: C++ does not allow references to references
- --> $DIR/reference_to_reference.rs:9:23
+ --> tests/ui/reference_to_reference.rs:9:23
   |
 9 |         fn repro_r(t: &&ThingR);
   |                       ^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/reserved_lifetime.stderr b/third_party/rust/cxx/v1/crate/tests/ui/reserved_lifetime.stderr
index 723572d9..e958267 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/reserved_lifetime.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/reserved_lifetime.stderr
@@ -1,5 +1,5 @@
 error[E0262]: invalid lifetime parameter name: `'static`
- --> $DIR/reserved_lifetime.rs:6:19
+ --> tests/ui/reserved_lifetime.rs:6:19
   |
 6 |         fn logger<'static>() -> Pin<&'static Logger>;
   |                   ^^^^^^^ 'static is a reserved lifetime name
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/reserved_name.stderr b/third_party/rust/cxx/v1/crate/tests/ui/reserved_name.stderr
index 6684771..7636f87 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/reserved_name.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/reserved_name.stderr
@@ -1,17 +1,17 @@
 error: reserved name
- --> $DIR/reserved_name.rs:3:12
+ --> tests/ui/reserved_name.rs:3:12
   |
 3 |     struct UniquePtr {
   |            ^^^^^^^^^
 
 error: reserved name
- --> $DIR/reserved_name.rs:8:14
+ --> tests/ui/reserved_name.rs:8:14
   |
 8 |         type Box;
   |              ^^^
 
 error: reserved name
-  --> $DIR/reserved_name.rs:12:14
+  --> tests/ui/reserved_name.rs:12:14
    |
 12 |         type String;
    |              ^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/result_no_display.stderr b/third_party/rust/cxx/v1/crate/tests/ui/result_no_display.stderr
index d0502f9b..44d4b31 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/result_no_display.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/result_no_display.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `NonError` doesn't implement `std::fmt::Display`
- --> $DIR/result_no_display.rs:4:19
+ --> tests/ui/result_no_display.rs:4:19
   |
 4 |         fn f() -> Result<()>;
   |                   ^^^^^^^^^^ `NonError` cannot be formatted with the default formatter
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/root_namespace.stderr b/third_party/rust/cxx/v1/crate/tests/ui/root_namespace.stderr
index a9c01a2e..b834d91 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/root_namespace.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/root_namespace.stderr
@@ -1,5 +1,5 @@
 error: expected expression, found `]`
- --> $DIR/root_namespace.rs:9:19
+ --> tests/ui/root_namespace.rs:9:19
   |
 9 |     #[namespace = ]
   |                   ^ expected expression
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/rust_pinned.stderr b/third_party/rust/cxx/v1/crate/tests/ui/rust_pinned.stderr
index 8857681..a0fc033 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/rust_pinned.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/rust_pinned.stderr
@@ -1,17 +1,17 @@
 error[E0277]: `PhantomPinned` cannot be unpinned
-  --> $DIR/rust_pinned.rs:6:14
+  --> tests/ui/rust_pinned.rs:6:14
    |
 6  |         type Pinned;
    |              ^^^^^^ within `Pinned`, the trait `Unpin` is not implemented for `PhantomPinned`
    |
    = note: consider using `Box::pin`
 note: required because it appears within the type `Pinned`
-  --> $DIR/rust_pinned.rs:10:12
+  --> tests/ui/rust_pinned.rs:10:12
    |
 10 | pub struct Pinned {
    |            ^^^^^^
 note: required by a bound in `__AssertUnpin`
-  --> $DIR/rust_pinned.rs:6:9
+  --> tests/ui/rust_pinned.rs:6:9
    |
 6  |         type Pinned;
    |         ^^^^^^^^^^^^ required by this bound in `__AssertUnpin`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/slice_of_type_alias.stderr b/third_party/rust/cxx/v1/crate/tests/ui/slice_of_type_alias.stderr
index aff06f8..965f3be 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/slice_of_type_alias.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/slice_of_type_alias.stderr
@@ -1,11 +1,11 @@
 error[E0271]: type mismatch resolving `<ElementOpaque as ExternType>::Kind == Trivial`
-   --> $DIR/slice_of_type_alias.rs:13:9
+   --> tests/ui/slice_of_type_alias.rs:13:9
     |
 13  |         type ElementOpaque = crate::ElementOpaque;
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Trivial`, found enum `cxx::kind::Opaque`
     |
 note: required by a bound in `verify_extern_kind`
-   --> $DIR/extern_type.rs:186:41
+   --> src/extern_type.rs
     |
-186 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
+    | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
     |                                         ^^^^^^^^^^^ required by this bound in `verify_extern_kind`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/slice_unsupported.stderr b/third_party/rust/cxx/v1/crate/tests/ui/slice_unsupported.stderr
index 2cbd26d..b781bfd 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/slice_unsupported.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/slice_unsupported.stderr
@@ -1,11 +1,11 @@
 error: unsupported &mut [T] element type: opaque C++ type is not supported yet
- --> $DIR/slice_unsupported.rs:6:17
+ --> tests/ui/slice_unsupported.rs:6:17
   |
 6 |         fn f(_: &mut [Opaque]);
   |                 ^^^^^^^^^^^^^
 
 error: needs a cxx::ExternType impl in order to be used as a slice element in &mut [Opaque]
- --> $DIR/slice_unsupported.rs:4:9
+ --> tests/ui/slice_unsupported.rs:4:9
   |
 4 |         type Opaque;
   |         ^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/struct_cycle.stderr b/third_party/rust/cxx/v1/crate/tests/ui/struct_cycle.stderr
index 49bcb5f..9ee2d831 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/struct_cycle.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/struct_cycle.stderr
@@ -1,23 +1,23 @@
 error: unsupported cyclic data structure
-  --> $DIR/struct_cycle.rs:26:9
+  --> tests/ui/struct_cycle.rs:26:9
    |
 26 |         node2: Node2,
    |         ^^^^^^^^^^^^
 
 error: unsupported cyclic data structure
-  --> $DIR/struct_cycle.rs:22:9
+  --> tests/ui/struct_cycle.rs:22:9
    |
 22 |         node5: Node5,
    |         ^^^^^^^^^^^^
 
 error: unsupported cyclic data structure
-  --> $DIR/struct_cycle.rs:13:9
+  --> tests/ui/struct_cycle.rs:13:9
    |
 13 |         node4: Node4,
    |         ^^^^^^^^^^^^
 
 error: unsupported cyclic data structure
- --> $DIR/struct_cycle.rs:8:9
+ --> tests/ui/struct_cycle.rs:8:9
   |
 8 |         node2: Node2,
   |         ^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/type_alias_rust.stderr b/third_party/rust/cxx/v1/crate/tests/ui/type_alias_rust.stderr
index 1b08f67..8cf9a56f 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/type_alias_rust.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/type_alias_rust.stderr
@@ -1,5 +1,5 @@
 error: type alias in extern "Rust" block is not supported
- --> $DIR/type_alias_rust.rs:5:9
+ --> tests/ui/type_alias_rust.rs:5:9
   |
 5 |         type Alias = crate::Type;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_as_mut.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_as_mut.stderr
index a41f716a..1fe37b8 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_as_mut.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_as_mut.stderr
@@ -1,5 +1,5 @@
 error[E0596]: cannot borrow data in a dereference of `UniquePtr<ffi::Opaque>` as mutable
-  --> $DIR/unique_ptr_as_mut.rs:22:31
+  --> tests/ui/unique_ptr_as_mut.rs:22:31
    |
 22 |     let _: &mut ffi::Opaque = &mut opaque;
    |                               ^^^^^^^^^^^ cannot borrow as mutable
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_to_opaque.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_to_opaque.stderr
index 28e45cf..34847f1 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_to_opaque.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_to_opaque.stderr
@@ -1,13 +1,11 @@
 error[E0271]: type mismatch resolving `<outside::C as ExternType>::Kind == Trivial`
-  --> $DIR/unique_ptr_to_opaque.rs:22:5
+  --> tests/ui/unique_ptr_to_opaque.rs:22:5
    |
 22 |     cxx::UniquePtr::new(outside::C { a: 4 });
    |     ^^^^^^^^^^^^^^^^^^^ expected enum `Trivial`, found enum `cxx::kind::Opaque`
    |
-note: required by `UniquePtr::<T>::new`
-  --> $DIR/unique_ptr.rs:38:5
+note: required by a bound in `UniquePtr::<T>::new`
+  --> src/unique_ptr.rs
    |
-38 | /     pub fn new(value: T) -> Self
-39 | |     where
-40 | |         T: ExternType<Kind = Trivial>,
-   | |______________________________________^
+   |         T: ExternType<Kind = Trivial>,
+   |                       ^^^^^^^^^^^^^^ required by this bound in `UniquePtr::<T>::new`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_twice.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_twice.stderr
index ee26b64..a3ed0d6 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_twice.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unique_ptr_twice.stderr
@@ -1,5 +1,5 @@
 error[E0119]: conflicting implementations of trait `cxx::memory::UniquePtrTarget` for type `here::C`
-  --> $DIR/unique_ptr_twice.rs:16:5
+  --> tests/ui/unique_ptr_twice.rs:16:5
    |
 7  |     impl UniquePtr<C> {}
    |     ----------------- first implementation here
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unnamed_receiver.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unnamed_receiver.stderr
index e66d9e3..d903b23 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unnamed_receiver.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unnamed_receiver.stderr
@@ -1,11 +1,11 @@
 error: unnamed receiver type is only allowed if the surrounding extern block contains exactly one extern type; use `self: &mut TheType`
- --> $DIR/unnamed_receiver.rs:6:14
+ --> tests/ui/unnamed_receiver.rs:6:14
   |
 6 |         fn f(&mut self);
   |              ^^^^^^^^^
 
 error: unnamed receiver type is only allowed if the surrounding extern block contains exactly one extern type; use `self: &TheType`
-  --> $DIR/unnamed_receiver.rs:10:20
+  --> tests/ui/unnamed_receiver.rs:10:20
    |
 10 |         fn f(self: &Self);
    |                    ^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unpin_impl.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unpin_impl.stderr
index 01ee19c..afe5a80 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unpin_impl.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unpin_impl.stderr
@@ -1,8 +1,18 @@
-error[E0282]: type annotations needed for `fn()`
- --> $DIR/unpin_impl.rs:4:14
+error[E0282]: type annotations needed
+ --> tests/ui/unpin_impl.rs:4:14
   |
-1 | #[cxx::bridge]
-  | -------------- consider giving this pattern the explicit type `fn()`, with the type parameters specified
-...
 4 |         type Opaque;
   |              ^^^^^^ cannot infer type
+
+error[E0283]: type annotations needed
+ --> tests/ui/unpin_impl.rs:1:1
+  |
+1 | #[cxx::bridge]
+  | ^^^^^^^^^^^^^^ cannot infer type
+  |
+note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found
+ --> tests/ui/unpin_impl.rs:1:1
+  |
+1 | #[cxx::bridge]
+  | ^^^^^^^^^^^^^^
+  = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unrecognized_receiver.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unrecognized_receiver.stderr
index a44bec1..bc645fe 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unrecognized_receiver.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unrecognized_receiver.stderr
@@ -1,5 +1,5 @@
 error: unrecognized receiver type
- --> $DIR/unrecognized_receiver.rs:4:20
+ --> tests/ui/unrecognized_receiver.rs:4:20
   |
 4 |         fn f(self: &Unrecognized);
   |                    ^^^^^^^^^^^^^
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/unsupported_elided.stderr b/third_party/rust/cxx/v1/crate/tests/ui/unsupported_elided.stderr
index 8e8a986b..e9ea87b 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/unsupported_elided.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/unsupported_elided.stderr
@@ -1,5 +1,5 @@
 error[E0726]: implicit elided lifetime not allowed here
- --> $DIR/unsupported_elided.rs:6:14
+ --> tests/ui/unsupported_elided.rs:6:14
   |
 6 |         type T;
   |              ^- help: indicate the anonymous lifetime: `<'_>`
@@ -7,7 +7,7 @@
   = note: assuming a `'static` lifetime...
 
 error[E0106]: missing lifetime specifier
- --> $DIR/unsupported_elided.rs:8:24
+ --> tests/ui/unsupported_elided.rs:8:24
   |
 8 |         fn f(t: &T) -> &str;
   |                 --     ^ expected named lifetime parameter
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/vec_opaque.stderr b/third_party/rust/cxx/v1/crate/tests/ui/vec_opaque.stderr
index 3f208fec..fdf4799 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/vec_opaque.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/vec_opaque.stderr
@@ -1,23 +1,23 @@
 error: Rust Vec containing C++ type is not supported yet
-  --> $DIR/vec_opaque.rs:15:19
+  --> tests/ui/vec_opaque.rs:15:19
    |
 15 |         fn f() -> Vec<Job>;
    |                   ^^^^^^^^
 
 error: needs a cxx::ExternType impl in order to be used as a vector element in Vec<Job>
-  --> $DIR/vec_opaque.rs:11:9
+  --> tests/ui/vec_opaque.rs:11:9
    |
 11 |         type Job;
    |         ^^^^^^^^
 
 error[E0271]: type mismatch resolving `<handle::Job as ExternType>::Kind == Trivial`
-   --> $DIR/vec_opaque.rs:22:9
+   --> tests/ui/vec_opaque.rs:22:9
     |
 22  |         type Job = crate::handle::Job;
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Trivial`, found enum `cxx::kind::Opaque`
     |
 note: required by a bound in `verify_extern_kind`
-   --> $DIR/extern_type.rs:186:41
+   --> src/extern_type.rs
     |
-186 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
+    | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
     |                                         ^^^^^^^^^^^ required by this bound in `verify_extern_kind`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/vector_autotraits.stderr b/third_party/rust/cxx/v1/crate/tests/ui/vector_autotraits.stderr
index 52fd2a415..05593b7 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/vector_autotraits.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/vector_autotraits.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `*const cxx::void` cannot be sent between threads safely
-  --> $DIR/vector_autotraits.rs:20:5
+  --> tests/ui/vector_autotraits.rs:20:5
    |
 20 |     assert_send::<CxxVector<ffi::NotThreadSafe>>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*const cxx::void` cannot be sent between threads safely
@@ -8,7 +8,7 @@
    = note: required because it appears within the type `[*const cxx::void; 0]`
    = note: required because it appears within the type `cxx::private::Opaque`
 note: required because it appears within the type `NotThreadSafe`
-  --> $DIR/vector_autotraits.rs:7:14
+  --> tests/ui/vector_autotraits.rs:7:14
    |
 7  |         type NotThreadSafe;
    |              ^^^^^^^^^^^^^
@@ -16,7 +16,7 @@
    = note: required because it appears within the type `PhantomData<[NotThreadSafe]>`
    = note: required because it appears within the type `CxxVector<NotThreadSafe>`
 note: required by a bound in `assert_send`
-  --> $DIR/vector_autotraits.rs:16:19
+  --> tests/ui/vector_autotraits.rs:16:19
    |
 16 | fn assert_send<T: Send>() {}
    |                   ^^^^ required by this bound in `assert_send`
diff --git a/third_party/rust/cxx/v1/crate/tests/ui/wrong_type_id.stderr b/third_party/rust/cxx/v1/crate/tests/ui/wrong_type_id.stderr
index b66bb26..d8470029 100644
--- a/third_party/rust/cxx/v1/crate/tests/ui/wrong_type_id.stderr
+++ b/third_party/rust/cxx/v1/crate/tests/ui/wrong_type_id.stderr
@@ -1,5 +1,5 @@
 error[E0271]: type mismatch resolving `<StringPiece as ExternType>::Id == (f, o, l, l, y, (), B, y, t, e, R, a, n, g, e)`
-   --> $DIR/wrong_type_id.rs:11:9
+   --> tests/ui/wrong_type_id.rs:11:9
     |
 11  |         type ByteRange = crate::here::StringPiece;
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected a tuple with 15 elements, found one with 17 elements
@@ -7,7 +7,7 @@
     = note: expected tuple `(f, o, l, l, y, (), B, y, t, e, R, a, n, g, e)`
                found tuple `(f, o, l, l, y, (), S, t, r, i, n, g, P, i, e, c, e)`
 note: required by a bound in `verify_extern_type`
-   --> $DIR/extern_type.rs:183:41
+   --> src/extern_type.rs
     |
-183 | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {}
+    | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {}
     |                                         ^^^^^^^ required by this bound in `verify_extern_type`
diff --git a/third_party/rust/cxx/v1/crate/tools/bazel/third_party.bzl b/third_party/rust/cxx/v1/crate/tools/bazel/third_party.bzl
index 7f51c46..5b2ec3fe 100644
--- a/third_party/rust/cxx/v1/crate/tools/bazel/third_party.bzl
+++ b/third_party/rust/cxx/v1/crate/tools/bazel/third_party.bzl
@@ -1,5 +1,5 @@
 load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
-load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library")
+load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
 load("@third-party//:vendor.bzl", "vendored")
 
 def third_party_glob(include):
diff --git a/third_party/rust/cxx/v1/crate/tools/bazel/vendor.bzl b/third_party/rust/cxx/v1/crate/tools/bazel/vendor.bzl
index e51adb7b..284705e594 100644
--- a/third_party/rust/cxx/v1/crate/tools/bazel/vendor.bzl
+++ b/third_party/rust/cxx/v1/crate/tools/bazel/vendor.bzl
@@ -2,7 +2,8 @@
 of a crate in the current workspace.
 """
 
-load("@rules_rust//rust:repositories.bzl", "DEFAULT_RUST_VERSION", "load_arbitrary_tool")
+load("@rules_rust//rust:repositories.bzl", "load_arbitrary_tool")
+load("@rules_rust//rust:defs.bzl", "rust_common")
 
 def _impl(repository_ctx):
     # Link cxx repository into @third-party.
@@ -77,7 +78,7 @@
     attrs = {
         "cargo_version": attr.string(
             doc = "The version of cargo to use",
-            default = DEFAULT_RUST_VERSION,
+            default = rust_common.default_version,
         ),
         "cargo_iso_date": attr.string(
             doc = "The date of the tool (or None, if the version is a specific version)",
diff --git a/third_party/rust/cxx/v1/patches/0003-Remove-cc-and-env-usage-from-build.rs-in-cxx.patch b/third_party/rust/cxx/v1/patches/0003-Fix-include-path.patch
similarity index 100%
rename from third_party/rust/cxx/v1/patches/0003-Remove-cc-and-env-usage-from-build.rs-in-cxx.patch
rename to third_party/rust/cxx/v1/patches/0003-Fix-include-path.patch
diff --git a/third_party/rust/cxxbridge_cmd/v1/README.chromium b/third_party/rust/cxxbridge_cmd/v1/README.chromium
index d704ae1..d1880f8 100644
--- a/third_party/rust/cxxbridge_cmd/v1/README.chromium
+++ b/third_party/rust/cxxbridge_cmd/v1/README.chromium
@@ -1,10 +1,6 @@
 Name: cxxbridge-cmd
 URL: https://crates.io/crates/cxxbridge-cmd
 Description: C++ code generator for integrating `cxx` crate into a non-Cargo build.
-Version: 1.0.56
+Version: 1.0.57
 Security Critical: no
 License: Apache 2.0
-
-Patches:
-0001-Export-UniquePtr-and-similar-functions.patch
-Raised upstream at https://github.com/dtolnay/cxx/pull/967.
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/.cargo_vcs_info.json b/third_party/rust/cxxbridge_cmd/v1/crate/.cargo_vcs_info.json
index d6fd097..93a68ec6 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/.cargo_vcs_info.json
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "4c4987390a70ea063e90f0b4580fab35fa45a7d2"
+    "sha1": "0854ef70c0c31f1f2efb883d51e1b1db30eacd33"
   },
   "path_in_vcs": "gen/cmd"
 }
\ No newline at end of file
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.lock b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.lock
index 0ab92c2..dcf309e4 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.lock
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.lock
@@ -4,9 +4,9 @@
 
 [[package]]
 name = "ansi_term"
-version = "0.11.0"
+version = "0.12.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
 dependencies = [
  "winapi",
 ]
@@ -30,9 +30,9 @@
 
 [[package]]
 name = "clap"
-version = "2.33.3"
+version = "2.34.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
 dependencies = [
  "ansi_term",
  "atty",
@@ -55,7 +55,7 @@
 
 [[package]]
 name = "cxxbridge-cmd"
-version = "1.0.56"
+version = "1.0.57"
 dependencies = [
  "clap",
  "codespan-reporting",
@@ -75,15 +75,15 @@
 
 [[package]]
 name = "libc"
-version = "0.2.103"
+version = "0.2.108"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6"
+checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119"
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.29"
+version = "1.0.32"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d"
+checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
 dependencies = [
  "unicode-xid",
 ]
@@ -105,9 +105,9 @@
 
 [[package]]
 name = "syn"
-version = "1.0.78"
+version = "1.0.82"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4eac2e6c19f5c3abc0c229bea31ff0b9b091c7b14990e8924b92902a303a0c0"
+checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
 dependencies = [
  "proc-macro2",
  "quote",
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml
index 0759e12..2ff0d71a 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml
@@ -13,7 +13,7 @@
 edition = "2018"
 rust-version = "1.48"
 name = "cxxbridge-cmd"
-version = "1.0.56"
+version = "1.0.57"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 exclude = ["build.rs"]
 description = "C++ code generator for integrating `cxx` crate into a non-Cargo build."
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml.orig b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml.orig
index 0b95613..e2887554 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml.orig
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "cxxbridge-cmd"
-version = "1.0.56"
+version = "1.0.57"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 edition = "2018"
 rust-version = "1.48"
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/derive.rs b/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/derive.rs
index 96b3eea..7727fbc9 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/derive.rs
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/derive.rs
@@ -19,6 +19,8 @@
     Ord,
     PartialEq,
     PartialOrd,
+    Serialize,
+    Deserialize,
 }
 
 impl Derive {
@@ -34,6 +36,8 @@
             "Ord" => Trait::Ord,
             "PartialEq" => Trait::PartialEq,
             "PartialOrd" => Trait::PartialOrd,
+            "Serialize" => Trait::Serialize,
+            "Deserialize" => Trait::Deserialize,
             _ => return None,
         };
         let span = ident.span();
@@ -60,6 +64,8 @@
             Trait::Ord => "Ord",
             Trait::PartialEq => "PartialEq",
             Trait::PartialOrd => "PartialOrd",
+            Trait::Serialize => "Serialize",
+            Trait::Deserialize => "Deserialize",
         }
     }
 }
diff --git a/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/symbol.rs b/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/symbol.rs
index a13a4f3c..d5b9e36 100644
--- a/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/symbol.rs
+++ b/third_party/rust/cxxbridge_cmd/v1/crate/src/syntax/symbol.rs
@@ -42,7 +42,7 @@
     /// For example, for taking a symbol and then making a new symbol
     /// for a vec of that symbol.
     pub fn prefix_with(&self, prefix: &str) -> Symbol {
-        Symbol(format!("{}{}", prefix, self.to_string()))
+        Symbol(format!("{}{}", prefix, self))
     }
 }
 
diff --git a/third_party/rust/cxxbridge_cmd/v1/patches/0001-Export-UniquePtr-and-similar-functions.patch b/third_party/rust/cxxbridge_cmd/v1/patches/0001-Export-UniquePtr-and-similar-functions.patch
deleted file mode 100644
index c050c88f..0000000
--- a/third_party/rust/cxxbridge_cmd/v1/patches/0001-Export-UniquePtr-and-similar-functions.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From 0431bad0ddf7a8d03049bbb35c149c97adc34ca2 Mon Sep 17 00:00:00 2001
-From: adetaylor <adetaylor@chromium.org>
-Date: Mon, 29 Nov 2021 22:33:25 -0800
-Subject: [PATCH] Export UniquePtr and similar functions.
-
-Previously these did not respect
-  cxxbridge --cxx-impl-annotations
-and similar directives in other build pipelines. These may be linked against
-from Rust code just as other generated functions are, so it's important that
-they are exported from shared objects in a similar fashion.
----
- gen/src/write.rs | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/gen/src/write.rs b/gen/src/write.rs
-index a3b9c9fa..efe49b32 100644
---- a/gen/src/write.rs
-+++ b/gen/src/write.rs
-@@ -1637,6 +1637,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-         "static_assert(alignof(::std::unique_ptr<{}>) == alignof(void *), \"\");",
-         inner,
-     );
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$unique_ptr${}$null(::std::unique_ptr<{}> *ptr) noexcept {{",
-@@ -1646,6 +1647,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-     writeln!(out, "}}");
-     if can_construct_from_value {
-         out.builtin.maybe_uninit = true;
-+        begin_function_definition(out);
-         writeln!(
-             out,
-             "{} *cxxbridge1$unique_ptr${}$uninit(::std::unique_ptr<{}> *ptr) noexcept {{",
-@@ -1660,6 +1662,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-         writeln!(out, "  return uninit;");
-         writeln!(out, "}}");
-     }
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$unique_ptr${}$raw(::std::unique_ptr<{}> *ptr, {} *raw) noexcept {{",
-@@ -1667,6 +1670,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-     );
-     writeln!(out, "  ::new (ptr) ::std::unique_ptr<{}>(raw);", inner);
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "const {} *cxxbridge1$unique_ptr${}$get(const ::std::unique_ptr<{}>& ptr) noexcept {{",
-@@ -1674,6 +1678,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-     );
-     writeln!(out, "  return ptr.get();");
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "{} *cxxbridge1$unique_ptr${}$release(::std::unique_ptr<{}>& ptr) noexcept {{",
-@@ -1681,6 +1686,7 @@ fn write_unique_ptr_common(out: &mut OutFile, ty: UniquePtr) {
-     );
-     writeln!(out, "  return ptr.release();");
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$unique_ptr${}$drop(::std::unique_ptr<{}> *ptr) noexcept {{",
-@@ -1724,6 +1730,7 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
-         "static_assert(alignof(::std::shared_ptr<{}>) == alignof(void *), \"\");",
-         inner,
-     );
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$shared_ptr${}$null(::std::shared_ptr<{}> *ptr) noexcept {{",
-@@ -1733,6 +1740,7 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
-     writeln!(out, "}}");
-     if can_construct_from_value {
-         out.builtin.maybe_uninit = true;
-+        begin_function_definition(out);
-         writeln!(
-             out,
-             "{} *cxxbridge1$shared_ptr${}$uninit(::std::shared_ptr<{}> *ptr) noexcept {{",
-@@ -1747,6 +1755,7 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
-         writeln!(out, "  return uninit;");
-         writeln!(out, "}}");
-     }
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$shared_ptr${}$clone(const ::std::shared_ptr<{}>& self, ::std::shared_ptr<{}> *ptr) noexcept {{",
-@@ -1754,6 +1763,7 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
-     );
-     writeln!(out, "  ::new (ptr) ::std::shared_ptr<{}>(self);", inner);
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "const {} *cxxbridge1$shared_ptr${}$get(const ::std::shared_ptr<{}>& self) noexcept {{",
-@@ -1761,6 +1771,7 @@ fn write_shared_ptr(out: &mut OutFile, key: NamedImplKey) {
-     );
-     writeln!(out, "  return self.get();");
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$shared_ptr${}$drop(::std::shared_ptr<{}> *self) noexcept {{",
-@@ -1795,6 +1806,7 @@ fn write_weak_ptr(out: &mut OutFile, key: NamedImplKey) {
-     );
-     writeln!(out, "  ::new (ptr) ::std::weak_ptr<{}>();", inner);
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$weak_ptr${}$clone(const ::std::weak_ptr<{}>& self, ::std::weak_ptr<{}> *ptr) noexcept {{",
-@@ -1802,6 +1814,7 @@ fn write_weak_ptr(out: &mut OutFile, key: NamedImplKey) {
-     );
-     writeln!(out, "  ::new (ptr) ::std::weak_ptr<{}>(self);", inner);
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$weak_ptr${}$downgrade(const ::std::shared_ptr<{}>& shared, ::std::weak_ptr<{}> *weak) noexcept {{",
-@@ -1809,6 +1822,7 @@ fn write_weak_ptr(out: &mut OutFile, key: NamedImplKey) {
-     );
-     writeln!(out, "  ::new (weak) ::std::weak_ptr<{}>(shared);", inner);
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$weak_ptr${}$upgrade(const ::std::weak_ptr<{}>& weak, ::std::shared_ptr<{}> *shared) noexcept {{",
-@@ -1820,6 +1834,7 @@ fn write_weak_ptr(out: &mut OutFile, key: NamedImplKey) {
-         inner,
-     );
-     writeln!(out, "}}");
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "void cxxbridge1$weak_ptr${}$drop(::std::weak_ptr<{}> *self) noexcept {{",
-@@ -1846,6 +1861,7 @@ fn write_cxx_vector(out: &mut OutFile, key: NamedImplKey) {
-     writeln!(out, "  return s.size();");
-     writeln!(out, "}}");
- 
-+    begin_function_definition(out);
-     writeln!(
-         out,
-         "{} *cxxbridge1$std$vector${}$get_unchecked(::std::vector<{}> *s, ::std::size_t pos) noexcept {{",
-@@ -1855,6 +1871,7 @@ fn write_cxx_vector(out: &mut OutFile, key: NamedImplKey) {
-     writeln!(out, "}}");
- 
-     if out.types.is_maybe_trivial(element) {
-+        begin_function_definition(out);
-         writeln!(
-             out,
-             "void cxxbridge1$std$vector${}$push_back(::std::vector<{}> *v, {} *value) noexcept {{",
-@@ -1864,6 +1881,7 @@ fn write_cxx_vector(out: &mut OutFile, key: NamedImplKey) {
-         writeln!(out, "  ::rust::destroy(value);");
-         writeln!(out, "}}");
- 
-+        begin_function_definition(out);
-         writeln!(
-             out,
-             "void cxxbridge1$std$vector${}$pop_back(::std::vector<{}> *v, {} *out) noexcept {{",
--- 
-2.34.0.rc2.393.gf8c9666880-goog
-
diff --git a/third_party/rust/cxxbridge_macro/v1/README.chromium b/third_party/rust/cxxbridge_macro/v1/README.chromium
index 027f023..0eb7789 100644
--- a/third_party/rust/cxxbridge_macro/v1/README.chromium
+++ b/third_party/rust/cxxbridge_macro/v1/README.chromium
@@ -1,6 +1,6 @@
 Name: cxxbridge-macro
 URL: https://crates.io/crates/cxxbridge-macro
 Description: Implementation detail of the `cxx` crate.
-Version: 1.0.56
+Version: 1.0.57
 Security Critical: no
 License: Apache 2.0
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/.cargo_vcs_info.json b/third_party/rust/cxxbridge_macro/v1/crate/.cargo_vcs_info.json
index 6e22cd9..118448e 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/.cargo_vcs_info.json
+++ b/third_party/rust/cxxbridge_macro/v1/crate/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
 {
   "git": {
-    "sha1": "4c4987390a70ea063e90f0b4580fab35fa45a7d2"
+    "sha1": "0854ef70c0c31f1f2efb883d51e1b1db30eacd33"
   },
   "path_in_vcs": "macro"
 }
\ No newline at end of file
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml b/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml
index b54fb55..ee5ff90 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml
+++ b/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml
@@ -13,7 +13,7 @@
 edition = "2018"
 rust-version = "1.48"
 name = "cxxbridge-macro"
-version = "1.0.56"
+version = "1.0.57"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 exclude = ["build.rs", "README.md"]
 description = "Implementation detail of the `cxx` crate."
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml.orig b/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml.orig
index acbf762..0f227c95 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml.orig
+++ b/third_party/rust/cxxbridge_macro/v1/crate/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "cxxbridge-macro"
-version = "1.0.56"
+version = "1.0.57"
 authors = ["David Tolnay <dtolnay@gmail.com>"]
 edition = "2018"
 rust-version = "1.48"
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/src/derive.rs b/third_party/rust/cxxbridge_macro/v1/crate/src/derive.rs
index ea36e3e..634809d 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/src/derive.rs
+++ b/third_party/rust/cxxbridge_macro/v1/crate/src/derive.rs
@@ -21,6 +21,8 @@
             Trait::Ord => expanded.extend(struct_ord(strct, span)),
             Trait::PartialEq => traits.push(quote_spanned!(span=> ::std::cmp::PartialEq)),
             Trait::PartialOrd => expanded.extend(struct_partial_ord(strct, span)),
+            Trait::Serialize => traits.push(quote_spanned!(span=> ::serde::Serialize)),
+            Trait::Deserialize => traits.push(quote_spanned!(span=> ::serde::Deserialize)),
         }
     }
 
@@ -66,6 +68,8 @@
                 has_partial_eq = true;
             }
             Trait::PartialOrd => expanded.extend(enum_partial_ord(enm, span)),
+            Trait::Serialize => traits.push(quote_spanned!(span=> ::serde::Serialize)),
+            Trait::Deserialize => traits.push(quote_spanned!(span=> ::serde::Deserialize)),
         }
     }
 
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/src/expand.rs b/third_party/rust/cxxbridge_macro/v1/crate/src/expand.rs
index 5a879cb..b07ac17 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/src/expand.rs
+++ b/third_party/rust/cxxbridge_macro/v1/crate/src/expand.rs
@@ -389,7 +389,7 @@
     let infer = Token![_](ident.span());
 
     quote! {
-        let _ = {
+        let _: fn() = {
             // Derived from https://github.com/nvzqz/static-assertions-rs.
             trait __AmbiguousIfImpl<A> {
                 fn infer() {}
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/derive.rs b/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/derive.rs
index 96b3eea..7727fbc9 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/derive.rs
+++ b/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/derive.rs
@@ -19,6 +19,8 @@
     Ord,
     PartialEq,
     PartialOrd,
+    Serialize,
+    Deserialize,
 }
 
 impl Derive {
@@ -34,6 +36,8 @@
             "Ord" => Trait::Ord,
             "PartialEq" => Trait::PartialEq,
             "PartialOrd" => Trait::PartialOrd,
+            "Serialize" => Trait::Serialize,
+            "Deserialize" => Trait::Deserialize,
             _ => return None,
         };
         let span = ident.span();
@@ -60,6 +64,8 @@
             Trait::Ord => "Ord",
             Trait::PartialEq => "PartialEq",
             Trait::PartialOrd => "PartialOrd",
+            Trait::Serialize => "Serialize",
+            Trait::Deserialize => "Deserialize",
         }
     }
 }
diff --git a/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/symbol.rs b/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/symbol.rs
index a13a4f3c..d5b9e36 100644
--- a/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/symbol.rs
+++ b/third_party/rust/cxxbridge_macro/v1/crate/src/syntax/symbol.rs
@@ -42,7 +42,7 @@
     /// For example, for taking a symbol and then making a new symbol
     /// for a vec of that symbol.
     pub fn prefix_with(&self, prefix: &str) -> Symbol {
-        Symbol(format!("{}{}", prefix, self.to_string()))
+        Symbol(format!("{}{}", prefix, self))
     }
 }