Updated rust-analyzer generator to use clap (#1471)

diff --git a/tools/rust_analyzer/3rdparty/BUILD.bazel b/tools/rust_analyzer/3rdparty/BUILD.bazel
index 5998615..37f4b18 100644
--- a/tools/rust_analyzer/3rdparty/BUILD.bazel
+++ b/tools/rust_analyzer/3rdparty/BUILD.bazel
@@ -9,6 +9,13 @@
         "anyhow": crate.spec(
             version = "1.0.58",
         ),
+        "clap": crate.spec(
+            features = [
+                "derive",
+                "env",
+            ],
+            version = "3.2.12",
+        ),
         "env_logger": crate.spec(
             version = "0.9.0",
         ),
@@ -25,9 +32,6 @@
         "serde_json": crate.spec(
             version = "1.0.82",
         ),
-        "structopt": crate.spec(
-            version = "0.3.26",
-        ),
     },
     repository_name = "rules_rust_rust_analyzer",
     tags = ["manual"],
diff --git a/tools/rust_analyzer/3rdparty/Cargo.Bazel.lock b/tools/rust_analyzer/3rdparty/Cargo.Bazel.lock
index 8caf8c5..cf953a7 100644
--- a/tools/rust_analyzer/3rdparty/Cargo.Bazel.lock
+++ b/tools/rust_analyzer/3rdparty/Cargo.Bazel.lock
@@ -12,15 +12,6 @@
 ]
 
 [[package]]
-name = "ansi_term"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
-dependencies = [
- "winapi",
-]
-
-[[package]]
 name = "anyhow"
 version = "1.0.58"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -38,6 +29,12 @@
 ]
 
 [[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
 name = "bitflags"
 version = "1.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -51,17 +48,41 @@
 
 [[package]]
 name = "clap"
-version = "2.34.0"
+version = "3.2.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "ab8b79fe3946ceb4a0b1c080b4018992b8d27e9ff363644c1c9b6387c854614d"
 dependencies = [
- "ansi_term",
  "atty",
  "bitflags",
+ "clap_derive",
+ "clap_lex",
+ "indexmap",
+ "once_cell",
  "strsim",
+ "termcolor",
  "textwrap",
- "unicode-width",
- "vec_map",
+]
+
+[[package]]
+name = "clap_derive"
+version = "3.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902"
+dependencies = [
+ "heck",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
 ]
 
 [[package]]
@@ -69,12 +90,12 @@
 version = "0.0.1"
 dependencies = [
  "anyhow",
+ "clap",
  "env_logger",
  "itertools",
  "log",
  "serde",
  "serde_json",
- "structopt",
 ]
 
 [[package]]
@@ -97,13 +118,16 @@
 ]
 
 [[package]]
-name = "heck"
-version = "0.3.3"
+name = "hashbrown"
+version = "0.12.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
-dependencies = [
- "unicode-segmentation",
-]
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
+
+[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
 
 [[package]]
 name = "hermit-abi"
@@ -121,6 +145,16 @@
 checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
 
 [[package]]
+name = "indexmap"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
+dependencies = [
+ "autocfg",
+ "hashbrown",
+]
+
+[[package]]
 name = "itertools"
 version = "0.10.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -136,12 +170,6 @@
 checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d"
 
 [[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
-[[package]]
 name = "libc"
 version = "0.2.126"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -163,6 +191,18 @@
 checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
 
 [[package]]
+name = "once_cell"
+version = "1.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
+
+[[package]]
+name = "os_str_bytes"
+version = "6.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4"
+
+[[package]]
 name = "proc-macro-error"
 version = "1.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -260,33 +300,9 @@
 
 [[package]]
 name = "strsim"
-version = "0.8.0"
+version = "0.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
-
-[[package]]
-name = "structopt"
-version = "0.3.26"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
-dependencies = [
- "clap",
- "lazy_static",
- "structopt-derive",
-]
-
-[[package]]
-name = "structopt-derive"
-version = "0.4.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
-dependencies = [
- "heck",
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "syn",
-]
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
 
 [[package]]
 name = "syn"
@@ -310,36 +326,15 @@
 
 [[package]]
 name = "textwrap"
-version = "0.11.0"
+version = "0.15.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
+checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.1"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
-
-[[package]]
-name = "unicode-segmentation"
-version = "1.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99"
-
-[[package]]
-name = "unicode-width"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
-
-[[package]]
-name = "vec_map"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
+checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7"
 
 [[package]]
 name = "version_check"
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.ansi_term-0.12.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.ansi_term-0.12.1.bazel
deleted file mode 100644
index e87706c..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.ansi_term-0.12.1.bazel
+++ /dev/null
@@ -1,100 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT
-# ])
-
-rust_library(
-    name = "ansi_term",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2015",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.12.1",
-    deps = [
-    ] + select_with_or({
-        # cfg(target_os = "windows")
-        (
-            "@rules_rust//rust/platform:i686-pc-windows-msvc",
-            "@rules_rust//rust/platform:x86_64-pc-windows-msvc",
-        ): [
-            # Target Deps
-            "@rules_rust_rust_analyzer__winapi-0.3.9//:winapi",
-
-            # Common Deps
-        ],
-        "//conditions:default": [
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
similarity index 95%
rename from tools/rust_analyzer/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel
rename to tools/rust_analyzer/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
index edfa281..bcf233a 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.lazy_static-1.4.0.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.autocfg-1.1.0.bazel
@@ -21,11 +21,11 @@
 package(default_visibility = ["//visibility:public"])
 
 # licenses([
-#     "TODO",  # MIT/Apache-2.0
+#     "TODO",  # Apache-2.0 OR MIT
 # ])
 
 rust_library(
-    name = "lazy_static",
+    name = "autocfg",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -81,7 +81,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.4.0",
+    version = "1.1.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.bazel
index 089689f..d89f0ea 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.bazel
@@ -34,6 +34,12 @@
 )
 
 alias(
+    name = "clap",
+    actual = "@rules_rust_rust_analyzer__clap-3.2.12//:clap",
+    tags = ["manual"],
+)
+
+alias(
     name = "env_logger",
     actual = "@rules_rust_rust_analyzer__env_logger-0.9.0//:env_logger",
     tags = ["manual"],
@@ -63,10 +69,9 @@
     tags = ["manual"],
 )
 
+# Binaries
 alias(
-    name = "structopt",
-    actual = "@rules_rust_rust_analyzer__structopt-0.3.26//:structopt",
+    name = "clap__stdio-fixture",
+    actual = "@rules_rust_rust_analyzer__clap-3.2.12//:stdio-fixture__bin",
     tags = ["manual"],
 )
-
-# Binaries
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.clap-2.34.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.clap-2.34.0.bazel
deleted file mode 100644
index 2a1d62c..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.clap-2.34.0.bazel
+++ /dev/null
@@ -1,139 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT
-# ])
-
-rust_library(
-    name = "clap",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-        "ansi_term",
-        "atty",
-        "color",
-        "default",
-        "strsim",
-        "suggestions",
-        "vec_map",
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2018",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "2.34.0",
-    deps = [
-    ] + select_with_or({
-        # cfg(not(windows))
-        (
-            "@rules_rust//rust/platform:aarch64-apple-darwin",
-            "@rules_rust//rust/platform:aarch64-apple-ios",
-            "@rules_rust//rust/platform:aarch64-apple-ios-sim",
-            "@rules_rust//rust/platform:aarch64-linux-android",
-            "@rules_rust//rust/platform:aarch64-unknown-linux-gnu",
-            "@rules_rust//rust/platform:arm-unknown-linux-gnueabi",
-            "@rules_rust//rust/platform:armv7-linux-androideabi",
-            "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi",
-            "@rules_rust//rust/platform:i686-apple-darwin",
-            "@rules_rust//rust/platform:i686-linux-android",
-            "@rules_rust//rust/platform:i686-unknown-freebsd",
-            "@rules_rust//rust/platform:i686-unknown-linux-gnu",
-            "@rules_rust//rust/platform:powerpc-unknown-linux-gnu",
-            "@rules_rust//rust/platform:riscv32imc-unknown-none-elf",
-            "@rules_rust//rust/platform:s390x-unknown-linux-gnu",
-            "@rules_rust//rust/platform:wasm32-unknown-unknown",
-            "@rules_rust//rust/platform:wasm32-wasi",
-            "@rules_rust//rust/platform:x86_64-apple-darwin",
-            "@rules_rust//rust/platform:x86_64-apple-ios",
-            "@rules_rust//rust/platform:x86_64-linux-android",
-            "@rules_rust//rust/platform:x86_64-unknown-freebsd",
-            "@rules_rust//rust/platform:x86_64-unknown-linux-gnu",
-        ): [
-            # Target Deps
-            "@rules_rust_rust_analyzer__ansi_term-0.12.1//:ansi_term",
-
-            # Common Deps
-            "@rules_rust_rust_analyzer__atty-0.2.14//:atty",
-            "@rules_rust_rust_analyzer__bitflags-1.3.2//:bitflags",
-            "@rules_rust_rust_analyzer__strsim-0.8.0//:strsim",
-            "@rules_rust_rust_analyzer__textwrap-0.11.0//:textwrap",
-            "@rules_rust_rust_analyzer__unicode-width-0.1.9//:unicode_width",
-            "@rules_rust_rust_analyzer__vec_map-0.8.2//:vec_map",
-        ],
-        "//conditions:default": [
-            "@rules_rust_rust_analyzer__atty-0.2.14//:atty",
-            "@rules_rust_rust_analyzer__bitflags-1.3.2//:bitflags",
-            "@rules_rust_rust_analyzer__strsim-0.8.0//:strsim",
-            "@rules_rust_rust_analyzer__textwrap-0.11.0//:textwrap",
-            "@rules_rust_rust_analyzer__unicode-width-0.1.9//:unicode_width",
-            "@rules_rust_rust_analyzer__vec_map-0.8.2//:vec_map",
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.clap-3.2.12.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.clap-3.2.12.bazel
new file mode 100644
index 0000000..852e149
--- /dev/null
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.clap-3.2.12.bazel
@@ -0,0 +1,197 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@bazel_skylib//lib:selects.bzl",
+    "selects",
+)
+
+# buildifier: disable=bzl-visibility
+load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
+load(
+    "@rules_rust//rust:defs.bzl",
+    "rust_binary",
+    "rust_library",
+)
+
+package(default_visibility = ["//visibility:public"])
+
+# licenses([
+#     "TODO",  # MIT OR Apache-2.0
+# ])
+
+rust_library(
+    name = "clap",
+    srcs = glob(
+        include = [
+            "**/*.rs",
+        ],
+        exclude = [
+        ],
+    ),
+    aliases = selects.with_or({
+        "//conditions:default": {
+        },
+    }),
+    compile_data = glob(
+        include = ["**"],
+        exclude = [
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ) + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    crate_features = [
+        "atty",
+        "clap_derive",
+        "color",
+        "default",
+        "derive",
+        "env",
+        "once_cell",
+        "std",
+        "strsim",
+        "suggestions",
+        "termcolor",
+    ],
+    crate_root = "src/lib.rs",
+    data = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    edition = "2021",
+    proc_macro_deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__clap_derive-3.2.7//:clap_derive",
+        ],
+    }),
+    rustc_env = {
+    },
+    rustc_env_files = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_flags = [
+        # In most cases, warnings in 3rd party crates are not interesting as
+        # they're out of the control of consumers. The flag here silences
+        # warnings. For more details see:
+        # https://doc.rust-lang.org/rustc/lints/levels.html
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "3.2.12",
+    deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__atty-0.2.14//:atty",
+            "@rules_rust_rust_analyzer__bitflags-1.3.2//:bitflags",
+            "@rules_rust_rust_analyzer__clap_lex-0.2.4//:clap_lex",
+            "@rules_rust_rust_analyzer__indexmap-1.9.1//:indexmap",
+            "@rules_rust_rust_analyzer__once_cell-1.13.0//:once_cell",
+            "@rules_rust_rust_analyzer__strsim-0.10.0//:strsim",
+            "@rules_rust_rust_analyzer__termcolor-1.1.3//:termcolor",
+            "@rules_rust_rust_analyzer__textwrap-0.15.0//:textwrap",
+        ],
+    }),
+)
+
+rust_binary(
+    name = "stdio-fixture__bin",
+    srcs = glob(
+        include = [
+            "**/*.rs",
+        ],
+        exclude = [
+        ],
+    ),
+    aliases = selects.with_or({
+        "//conditions:default": {
+        },
+    }),
+    compile_data = glob(
+        include = ["**"],
+        exclude = [
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ) + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    crate_features = [
+        "atty",
+        "clap_derive",
+        "color",
+        "default",
+        "derive",
+        "env",
+        "once_cell",
+        "std",
+        "strsim",
+        "suggestions",
+        "termcolor",
+    ],
+    crate_root = "src/bin/stdio-fixture.rs",
+    data = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    edition = "2021",
+    proc_macro_deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__clap_derive-3.2.7//:clap_derive",
+        ],
+    }),
+    rustc_env = {
+    },
+    rustc_env_files = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_flags = [
+        # In most cases, warnings in 3rd party crates are not interesting as
+        # they're out of the control of consumers. The flag here silences
+        # warnings. For more details see:
+        # https://doc.rust-lang.org/rustc/lints/levels.html
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "3.2.12",
+    deps = [
+        ":clap",
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__atty-0.2.14//:atty",
+            "@rules_rust_rust_analyzer__bitflags-1.3.2//:bitflags",
+            "@rules_rust_rust_analyzer__clap_lex-0.2.4//:clap_lex",
+            "@rules_rust_rust_analyzer__indexmap-1.9.1//:indexmap",
+            "@rules_rust_rust_analyzer__once_cell-1.13.0//:once_cell",
+            "@rules_rust_rust_analyzer__strsim-0.10.0//:strsim",
+            "@rules_rust_rust_analyzer__termcolor-1.1.3//:termcolor",
+            "@rules_rust_rust_analyzer__textwrap-0.15.0//:textwrap",
+        ],
+    }),
+)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.structopt-derive-0.4.18.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.clap_derive-3.2.7.bazel
similarity index 92%
rename from tools/rust_analyzer/3rdparty/crates/BUILD.structopt-derive-0.4.18.bazel
rename to tools/rust_analyzer/3rdparty/crates/BUILD.clap_derive-3.2.7.bazel
index 58b574a..128996e 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.structopt-derive-0.4.18.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.clap_derive-3.2.7.bazel
@@ -21,11 +21,11 @@
 package(default_visibility = ["//visibility:public"])
 
 # licenses([
-#     "TODO",  # Apache-2.0/MIT
+#     "TODO",  # MIT OR Apache-2.0
 # ])
 
 rust_proc_macro(
-    name = "structopt_derive",
+    name = "clap_derive",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -50,13 +50,14 @@
         ],
     }),
     crate_features = [
+        "default",
     ],
     crate_root = "src/lib.rs",
     data = select_with_or({
         "//conditions:default": [
         ],
     }),
-    edition = "2018",
+    edition = "2021",
     proc_macro_deps = [
     ] + select_with_or({
         "//conditions:default": [
@@ -81,11 +82,11 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "0.4.18",
+    version = "3.2.7",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
-            "@rules_rust_rust_analyzer__heck-0.3.3//:heck",
+            "@rules_rust_rust_analyzer__heck-0.4.0//:heck",
             "@rules_rust_rust_analyzer__proc-macro-error-1.0.4//:proc_macro_error",
             "@rules_rust_rust_analyzer__proc-macro2-1.0.40//:proc_macro2",
             "@rules_rust_rust_analyzer__quote-1.0.20//:quote",
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.clap_lex-0.2.4.bazel
similarity index 93%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.clap_lex-0.2.4.bazel
index a2ca28c..f7c5b04 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.clap_lex-0.2.4.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "unicode_ident",
+    name = "clap_lex",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -56,7 +56,7 @@
         "//conditions:default": [
         ],
     }),
-    edition = "2018",
+    edition = "2021",
     proc_macro_deps = [
     ] + select_with_or({
         "//conditions:default": [
@@ -81,10 +81,11 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "0.2.4",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
+            "@rules_rust_rust_analyzer__os_str_bytes-6.2.0//:os_str_bytes",
         ],
     }),
 )
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
similarity index 95%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
index a2ca28c..69925a1 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.hashbrown-0.12.3.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "unicode_ident",
+    name = "hashbrown",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -50,13 +50,14 @@
         ],
     }),
     crate_features = [
+        "raw",
     ],
     crate_root = "src/lib.rs",
     data = select_with_or({
         "//conditions:default": [
         ],
     }),
-    edition = "2018",
+    edition = "2021",
     proc_macro_deps = [
     ] + select_with_or({
         "//conditions:default": [
@@ -81,7 +82,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "0.12.3",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.3.3.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.3.3.bazel
deleted file mode 100644
index 6d3623e..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.3.3.bazel
+++ /dev/null
@@ -1,91 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT OR Apache-2.0
-# ])
-
-rust_library(
-    name = "heck",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2018",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.3.3",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-            "@rules_rust_rust_analyzer__unicode-segmentation-1.9.0//:unicode_segmentation",
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.4.0.bazel
similarity index 96%
rename from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
rename to tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.4.0.bazel
index a2ca28c..2098d03 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.heck-0.4.0.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "unicode_ident",
+    name = "heck",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -50,6 +50,7 @@
         ],
     }),
     crate_features = [
+        "default",
     ],
     crate_root = "src/lib.rs",
     data = select_with_or({
@@ -81,7 +82,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "0.4.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.indexmap-1.9.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.indexmap-1.9.1.bazel
new file mode 100644
index 0000000..790ccd9
--- /dev/null
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.indexmap-1.9.1.bazel
@@ -0,0 +1,178 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@bazel_skylib//lib:selects.bzl",
+    "selects",
+)
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+)
+
+# buildifier: disable=bzl-visibility
+load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
+load(
+    "@rules_rust//rust:defs.bzl",
+    "rust_library",
+)
+
+package(default_visibility = ["//visibility:public"])
+
+# licenses([
+#     "TODO",  # Apache-2.0 OR MIT
+# ])
+
+rust_library(
+    name = "indexmap",
+    srcs = glob(
+        include = [
+            "**/*.rs",
+        ],
+        exclude = [
+        ],
+    ),
+    aliases = selects.with_or({
+        "//conditions:default": {
+        },
+    }),
+    compile_data = glob(
+        include = ["**"],
+        exclude = [
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ) + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    crate_features = [
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    data = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    edition = "2021",
+    proc_macro_deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_env = {
+    },
+    rustc_env_files = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_flags = [
+        # In most cases, warnings in 3rd party crates are not interesting as
+        # they're out of the control of consumers. The flag here silences
+        # warnings. For more details see:
+        # https://doc.rust-lang.org/rustc/lints/levels.html
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.9.1",
+    deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__hashbrown-0.12.3//:hashbrown",
+            "@rules_rust_rust_analyzer__indexmap-1.9.1//:build_script_build",
+        ],
+    }),
+)
+
+cargo_build_script(
+    # See comment associated with alias. Do not change this name
+    name = "indexmap_build_script",
+    srcs = glob(
+        include = [
+            "**/*.rs",
+        ],
+        exclude = [
+        ],
+    ),
+    aliases = selects.with_or({
+        "//conditions:default": {
+        },
+    }),
+    build_script_env = {
+    },
+    compile_data = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    crate_features = [
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(["**"]) + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    edition = "2021",
+    proc_macro_deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_env = {
+    },
+    rustc_env_files = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    rustc_flags = [
+        # In most cases, warnings in 3rd party crates are not interesting as
+        # they're out of the control of consumers. The flag here silences
+        # warnings. For more details see:
+        # https://doc.rust-lang.org/rustc/lints/levels.html
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    tools = select_with_or({
+        "//conditions:default": [
+        ],
+    }),
+    version = "1.9.1",
+    visibility = ["//visibility:private"],
+    deps = [
+    ] + select_with_or({
+        "//conditions:default": [
+            "@rules_rust_rust_analyzer__autocfg-1.1.0//:autocfg",
+        ],
+    }),
+)
+
+alias(
+    # Because `cargo_build_script` does some invisible target name mutating to
+    # determine the package and crate name for a build script, the Bazel
+    # target namename of any build script cannot be the Cargo canonical name
+    # of `build_script_build` without losing out on having certain Cargo
+    # environment variables set.
+    name = "build_script_build",
+    actual = "indexmap_build_script",
+    tags = [
+        "manual",
+    ],
+)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.once_cell-1.13.0.bazel
similarity index 94%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.once_cell-1.13.0.bazel
index a2ca28c..4f4b425 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.once_cell-1.13.0.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "unicode_ident",
+    name = "once_cell",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -50,6 +50,10 @@
         ],
     }),
     crate_features = [
+        "alloc",
+        "default",
+        "race",
+        "std",
     ],
     crate_root = "src/lib.rs",
     data = select_with_or({
@@ -81,7 +85,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "1.13.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.os_str_bytes-6.2.0.bazel
similarity index 95%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.os_str_bytes-6.2.0.bazel
index a2ca28c..a53f242 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.os_str_bytes-6.2.0.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "unicode_ident",
+    name = "os_str_bytes",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -50,13 +50,14 @@
         ],
     }),
     crate_features = [
+        "raw_os_str",
     ],
     crate_root = "src/lib.rs",
     data = select_with_or({
         "//conditions:default": [
         ],
     }),
-    edition = "2018",
+    edition = "2021",
     proc_macro_deps = [
     ] + select_with_or({
         "//conditions:default": [
@@ -81,7 +82,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "6.2.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.proc-macro2-1.0.40.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.proc-macro2-1.0.40.bazel
index d9889ec..9544ed2 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.proc-macro2-1.0.40.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.proc-macro2-1.0.40.bazel
@@ -92,7 +92,7 @@
     ] + select_with_or({
         "//conditions:default": [
             "@rules_rust_rust_analyzer__proc-macro2-1.0.40//:build_script_build",
-            "@rules_rust_rust_analyzer__unicode-ident-1.0.1//:unicode_ident",
+            "@rules_rust_rust_analyzer__unicode-ident-1.0.2//:unicode_ident",
         ],
     }),
 )
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.10.0.bazel
similarity index 98%
rename from tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel
rename to tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.10.0.bazel
index 0b61d55..7cfa3f3 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.10.0.bazel
@@ -81,7 +81,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "0.8.0",
+    version = "0.10.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.structopt-0.3.26.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.structopt-0.3.26.bazel
deleted file mode 100644
index 6be5fe2..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.structopt-0.3.26.bazel
+++ /dev/null
@@ -1,94 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # Apache-2.0 OR MIT
-# ])
-
-rust_library(
-    name = "structopt",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-        "default",
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2018",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-            "@rules_rust_rust_analyzer__structopt-derive-0.4.18//:structopt_derive",
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.3.26",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-            "@rules_rust_rust_analyzer__clap-2.34.0//:clap",
-            "@rules_rust_rust_analyzer__lazy_static-1.4.0//:lazy_static",
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.syn-1.0.98.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.syn-1.0.98.bazel
index 136ffd0..f4c648f 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.syn-1.0.98.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.syn-1.0.98.bazel
@@ -100,7 +100,7 @@
             "@rules_rust_rust_analyzer__proc-macro2-1.0.40//:proc_macro2",
             "@rules_rust_rust_analyzer__quote-1.0.20//:quote",
             "@rules_rust_rust_analyzer__syn-1.0.98//:build_script_build",
-            "@rules_rust_rust_analyzer__unicode-ident-1.0.1//:unicode_ident",
+            "@rules_rust_rust_analyzer__unicode-ident-1.0.2//:unicode_ident",
         ],
     }),
 )
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.11.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.11.0.bazel
deleted file mode 100644
index 2779901..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.11.0.bazel
+++ /dev/null
@@ -1,91 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT
-# ])
-
-rust_library(
-    name = "textwrap",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2015",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.11.0",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-            "@rules_rust_rust_analyzer__unicode-width-0.1.9//:unicode_width",
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.15.0.bazel
similarity index 96%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.15.0.bazel
index 0b61d55..1205a91 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.strsim-0.8.0.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.textwrap-0.15.0.bazel
@@ -25,7 +25,7 @@
 # ])
 
 rust_library(
-    name = "strsim",
+    name = "textwrap",
     srcs = glob(
         include = [
             "**/*.rs",
@@ -56,7 +56,7 @@
         "//conditions:default": [
         ],
     }),
-    edition = "2015",
+    edition = "2018",
     proc_macro_deps = [
     ] + select_with_or({
         "//conditions:default": [
@@ -81,7 +81,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "0.8.0",
+    version = "0.15.0",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.2.bazel
similarity index 95%
copy from tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
copy to tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.2.bazel
index a2ca28c..fec6cf6 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.1.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-ident-1.0.2.bazel
@@ -21,7 +21,7 @@
 package(default_visibility = ["//visibility:public"])
 
 # licenses([
-#     "TODO",  # MIT OR Apache-2.0
+#     "TODO",  # (MIT OR Apache-2.0) AND Unicode-DFS-2016
 # ])
 
 rust_library(
@@ -81,7 +81,7 @@
         "noclippy",
         "norustfmt",
     ],
-    version = "1.0.1",
+    version = "1.0.2",
     deps = [
     ] + select_with_or({
         "//conditions:default": [
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-segmentation-1.9.0.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-segmentation-1.9.0.bazel
deleted file mode 100644
index e6ec00a..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-segmentation-1.9.0.bazel
+++ /dev/null
@@ -1,90 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT/Apache-2.0
-# ])
-
-rust_library(
-    name = "unicode_segmentation",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2018",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "1.9.0",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel
deleted file mode 100644
index fa3bace..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.unicode-width-0.1.9.bazel
+++ /dev/null
@@ -1,91 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT/Apache-2.0
-# ])
-
-rust_library(
-    name = "unicode_width",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-        "default",
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2015",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.1.9",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.vec_map-0.8.2.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.vec_map-0.8.2.bazel
deleted file mode 100644
index 21c1f77..0000000
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.vec_map-0.8.2.bazel
+++ /dev/null
@@ -1,90 +0,0 @@
-###############################################################################
-# @generated
-# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
-# regenerate this file, run the following:
-#
-#     bazel run //tools/rust_analyzer/3rdparty:crates_vendor
-###############################################################################
-
-load(
-    "@bazel_skylib//lib:selects.bzl",
-    "selects",
-)
-
-# buildifier: disable=bzl-visibility
-load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
-load(
-    "@rules_rust//rust:defs.bzl",
-    "rust_library",
-)
-
-package(default_visibility = ["//visibility:public"])
-
-# licenses([
-#     "TODO",  # MIT/Apache-2.0
-# ])
-
-rust_library(
-    name = "vec_map",
-    srcs = glob(
-        include = [
-            "**/*.rs",
-        ],
-        exclude = [
-        ],
-    ),
-    aliases = selects.with_or({
-        "//conditions:default": {
-        },
-    }),
-    compile_data = glob(
-        include = ["**"],
-        exclude = [
-            "BUILD",
-            "BUILD.bazel",
-            "WORKSPACE",
-            "WORKSPACE.bazel",
-        ],
-    ) + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    crate_features = [
-    ],
-    crate_root = "src/lib.rs",
-    data = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    edition = "2015",
-    proc_macro_deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_env = {
-    },
-    rustc_env_files = select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-    rustc_flags = [
-        # In most cases, warnings in 3rd party crates are not interesting as
-        # they're out of the control of consumers. The flag here silences
-        # warnings. For more details see:
-        # https://doc.rust-lang.org/rustc/lints/levels.html
-        "--cap-lints=allow",
-    ],
-    tags = [
-        "cargo-bazel",
-        "manual",
-        "noclippy",
-        "norustfmt",
-    ],
-    version = "0.8.2",
-    deps = [
-    ] + select_with_or({
-        "//conditions:default": [
-        ],
-    }),
-)
diff --git a/tools/rust_analyzer/3rdparty/crates/BUILD.winapi-0.3.9.bazel b/tools/rust_analyzer/3rdparty/crates/BUILD.winapi-0.3.9.bazel
index fb79001..310c379 100644
--- a/tools/rust_analyzer/3rdparty/crates/BUILD.winapi-0.3.9.bazel
+++ b/tools/rust_analyzer/3rdparty/crates/BUILD.winapi-0.3.9.bazel
@@ -57,7 +57,6 @@
         "consoleapi",
         "errhandlingapi",
         "fileapi",
-        "handleapi",
         "minwinbase",
         "minwindef",
         "processenv",
@@ -140,7 +139,6 @@
         "consoleapi",
         "errhandlingapi",
         "fileapi",
-        "handleapi",
         "minwinbase",
         "minwindef",
         "processenv",
diff --git a/tools/rust_analyzer/3rdparty/crates/defs.bzl b/tools/rust_analyzer/3rdparty/crates/defs.bzl
index da633c2..f7e6b3c 100644
--- a/tools/rust_analyzer/3rdparty/crates/defs.bzl
+++ b/tools/rust_analyzer/3rdparty/crates/defs.bzl
@@ -292,12 +292,12 @@
     "": {
         _COMMON_CONDITION: {
             "anyhow": "@rules_rust_rust_analyzer__anyhow-1.0.58//:anyhow",
+            "clap": "@rules_rust_rust_analyzer__clap-3.2.12//:clap",
             "env_logger": "@rules_rust_rust_analyzer__env_logger-0.9.0//:env_logger",
             "itertools": "@rules_rust_rust_analyzer__itertools-0.10.3//:itertools",
             "log": "@rules_rust_rust_analyzer__log-0.4.17//:log",
             "serde": "@rules_rust_rust_analyzer__serde-1.0.139//:serde",
             "serde_json": "@rules_rust_rust_analyzer__serde_json-1.0.82//:serde_json",
-            "structopt": "@rules_rust_rust_analyzer__structopt-0.3.26//:structopt",
         },
     },
 }
@@ -360,9 +360,7 @@
 }
 
 _CONDITIONS = {
-    "cfg(not(windows))": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-apple-ios-sim", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-linux-androideabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "riscv32imc-unknown-none-elf", "s390x-unknown-linux-gnu", "wasm32-unknown-unknown", "wasm32-wasi", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"],
     "cfg(target_os = \"hermit\")": [],
-    "cfg(target_os = \"windows\")": ["i686-pc-windows-msvc", "x86_64-pc-windows-msvc"],
     "cfg(unix)": ["aarch64-apple-darwin", "aarch64-apple-ios", "aarch64-apple-ios-sim", "aarch64-linux-android", "aarch64-unknown-linux-gnu", "arm-unknown-linux-gnueabi", "armv7-linux-androideabi", "armv7-unknown-linux-gnueabi", "i686-apple-darwin", "i686-linux-android", "i686-unknown-freebsd", "i686-unknown-linux-gnu", "powerpc-unknown-linux-gnu", "s390x-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-apple-ios", "x86_64-linux-android", "x86_64-unknown-freebsd", "x86_64-unknown-linux-gnu"],
     "cfg(windows)": ["i686-pc-windows-msvc", "x86_64-pc-windows-msvc"],
     "i686-pc-windows-gnu": [],
@@ -385,16 +383,6 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__ansi_term-0.12.1",
-        sha256 = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/ansi_term/0.12.1/download"],
-        strip_prefix = "ansi_term-0.12.1",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.ansi_term-0.12.1.bazel"),
-    )
-
-    maybe(
-        http_archive,
         name = "rules_rust_rust_analyzer__anyhow-1.0.58",
         sha256 = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704",
         type = "tar.gz",
@@ -415,6 +403,16 @@
 
     maybe(
         http_archive,
+        name = "rules_rust_rust_analyzer__autocfg-1.1.0",
+        sha256 = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/autocfg/1.1.0/download"],
+        strip_prefix = "autocfg-1.1.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.autocfg-1.1.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
         name = "rules_rust_rust_analyzer__bitflags-1.3.2",
         sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a",
         type = "tar.gz",
@@ -435,12 +433,32 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__clap-2.34.0",
-        sha256 = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c",
+        name = "rules_rust_rust_analyzer__clap-3.2.12",
+        sha256 = "ab8b79fe3946ceb4a0b1c080b4018992b8d27e9ff363644c1c9b6387c854614d",
         type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/clap/2.34.0/download"],
-        strip_prefix = "clap-2.34.0",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.clap-2.34.0.bazel"),
+        urls = ["https://crates.io/api/v1/crates/clap/3.2.12/download"],
+        strip_prefix = "clap-3.2.12",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.clap-3.2.12.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rules_rust_rust_analyzer__clap_derive-3.2.7",
+        sha256 = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/clap_derive/3.2.7/download"],
+        strip_prefix = "clap_derive-3.2.7",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.clap_derive-3.2.7.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rules_rust_rust_analyzer__clap_lex-0.2.4",
+        sha256 = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/clap_lex/0.2.4/download"],
+        strip_prefix = "clap_lex-0.2.4",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.clap_lex-0.2.4.bazel"),
     )
 
     maybe(
@@ -465,12 +483,22 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__heck-0.3.3",
-        sha256 = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c",
+        name = "rules_rust_rust_analyzer__hashbrown-0.12.3",
+        sha256 = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888",
         type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/heck/0.3.3/download"],
-        strip_prefix = "heck-0.3.3",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.heck-0.3.3.bazel"),
+        urls = ["https://crates.io/api/v1/crates/hashbrown/0.12.3/download"],
+        strip_prefix = "hashbrown-0.12.3",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.hashbrown-0.12.3.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rules_rust_rust_analyzer__heck-0.4.0",
+        sha256 = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/heck/0.4.0/download"],
+        strip_prefix = "heck-0.4.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.heck-0.4.0.bazel"),
     )
 
     maybe(
@@ -495,6 +523,16 @@
 
     maybe(
         http_archive,
+        name = "rules_rust_rust_analyzer__indexmap-1.9.1",
+        sha256 = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/indexmap/1.9.1/download"],
+        strip_prefix = "indexmap-1.9.1",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.indexmap-1.9.1.bazel"),
+    )
+
+    maybe(
+        http_archive,
         name = "rules_rust_rust_analyzer__itertools-0.10.3",
         sha256 = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3",
         type = "tar.gz",
@@ -515,16 +553,6 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__lazy_static-1.4.0",
-        sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/lazy_static/1.4.0/download"],
-        strip_prefix = "lazy_static-1.4.0",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.lazy_static-1.4.0.bazel"),
-    )
-
-    maybe(
-        http_archive,
         name = "rules_rust_rust_analyzer__libc-0.2.126",
         sha256 = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836",
         type = "tar.gz",
@@ -555,6 +583,26 @@
 
     maybe(
         http_archive,
+        name = "rules_rust_rust_analyzer__once_cell-1.13.0",
+        sha256 = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/once_cell/1.13.0/download"],
+        strip_prefix = "once_cell-1.13.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.once_cell-1.13.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rules_rust_rust_analyzer__os_str_bytes-6.2.0",
+        sha256 = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4",
+        type = "tar.gz",
+        urls = ["https://crates.io/api/v1/crates/os_str_bytes/6.2.0/download"],
+        strip_prefix = "os_str_bytes-6.2.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.os_str_bytes-6.2.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
         name = "rules_rust_rust_analyzer__proc-macro-error-1.0.4",
         sha256 = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c",
         type = "tar.gz",
@@ -655,32 +703,12 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__strsim-0.8.0",
-        sha256 = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a",
+        name = "rules_rust_rust_analyzer__strsim-0.10.0",
+        sha256 = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623",
         type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/strsim/0.8.0/download"],
-        strip_prefix = "strsim-0.8.0",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.strsim-0.8.0.bazel"),
-    )
-
-    maybe(
-        http_archive,
-        name = "rules_rust_rust_analyzer__structopt-0.3.26",
-        sha256 = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/structopt/0.3.26/download"],
-        strip_prefix = "structopt-0.3.26",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.structopt-0.3.26.bazel"),
-    )
-
-    maybe(
-        http_archive,
-        name = "rules_rust_rust_analyzer__structopt-derive-0.4.18",
-        sha256 = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/structopt-derive/0.4.18/download"],
-        strip_prefix = "structopt-derive-0.4.18",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.structopt-derive-0.4.18.bazel"),
+        urls = ["https://crates.io/api/v1/crates/strsim/0.10.0/download"],
+        strip_prefix = "strsim-0.10.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.strsim-0.10.0.bazel"),
     )
 
     maybe(
@@ -705,52 +733,22 @@
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__textwrap-0.11.0",
-        sha256 = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060",
+        name = "rules_rust_rust_analyzer__textwrap-0.15.0",
+        sha256 = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb",
         type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/textwrap/0.11.0/download"],
-        strip_prefix = "textwrap-0.11.0",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.textwrap-0.11.0.bazel"),
+        urls = ["https://crates.io/api/v1/crates/textwrap/0.15.0/download"],
+        strip_prefix = "textwrap-0.15.0",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.textwrap-0.15.0.bazel"),
     )
 
     maybe(
         http_archive,
-        name = "rules_rust_rust_analyzer__unicode-ident-1.0.1",
-        sha256 = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c",
+        name = "rules_rust_rust_analyzer__unicode-ident-1.0.2",
+        sha256 = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7",
         type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/unicode-ident/1.0.1/download"],
-        strip_prefix = "unicode-ident-1.0.1",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.unicode-ident-1.0.1.bazel"),
-    )
-
-    maybe(
-        http_archive,
-        name = "rules_rust_rust_analyzer__unicode-segmentation-1.9.0",
-        sha256 = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/unicode-segmentation/1.9.0/download"],
-        strip_prefix = "unicode-segmentation-1.9.0",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.unicode-segmentation-1.9.0.bazel"),
-    )
-
-    maybe(
-        http_archive,
-        name = "rules_rust_rust_analyzer__unicode-width-0.1.9",
-        sha256 = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/unicode-width/0.1.9/download"],
-        strip_prefix = "unicode-width-0.1.9",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.unicode-width-0.1.9.bazel"),
-    )
-
-    maybe(
-        http_archive,
-        name = "rules_rust_rust_analyzer__vec_map-0.8.2",
-        sha256 = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191",
-        type = "tar.gz",
-        urls = ["https://crates.io/api/v1/crates/vec_map/0.8.2/download"],
-        strip_prefix = "vec_map-0.8.2",
-        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.vec_map-0.8.2.bazel"),
+        urls = ["https://crates.io/api/v1/crates/unicode-ident/1.0.2/download"],
+        strip_prefix = "unicode-ident-1.0.2",
+        build_file = Label("@rules_rust//tools/rust_analyzer/3rdparty/crates:BUILD.unicode-ident-1.0.2.bazel"),
     )
 
     maybe(
diff --git a/tools/rust_analyzer/BUILD.bazel b/tools/rust_analyzer/BUILD.bazel
index 0105909..5de795c 100644
--- a/tools/rust_analyzer/BUILD.bazel
+++ b/tools/rust_analyzer/BUILD.bazel
@@ -13,9 +13,9 @@
     deps = [
         ":gen_rust_project_lib",
         "//tools/rust_analyzer/3rdparty/crates:anyhow",
+        "//tools/rust_analyzer/3rdparty/crates:clap",
         "//tools/rust_analyzer/3rdparty/crates:env_logger",
         "//tools/rust_analyzer/3rdparty/crates:log",
-        "//tools/rust_analyzer/3rdparty/crates:structopt",
         "//util/label",
     ],
 )
diff --git a/tools/rust_analyzer/main.rs b/tools/rust_analyzer/main.rs
index 2bad0e9..38a923c 100644
--- a/tools/rust_analyzer/main.rs
+++ b/tools/rust_analyzer/main.rs
@@ -4,9 +4,9 @@
 use std::process::Command;
 
 use anyhow::anyhow;
+use clap::Parser;
 use gen_rust_project_lib::generate_crate_info;
 use gen_rust_project_lib::write_rust_project;
-use structopt::StructOpt;
 
 // TODO(david): This shells out to an expected rule in the workspace root //:rust_analyzer that the user must define.
 // It would be more convenient if it could automatically discover all the rust code in the workspace if this target
@@ -51,7 +51,7 @@
 
 // Parse the configuration flags and supplement with bazel info as needed.
 fn parse_config() -> anyhow::Result<Config> {
-    let mut config = Config::from_args();
+    let mut config = Config::parse();
 
     // Ensure we know the workspace. If we are under `bazel run`, the
     // BUILD_WORKSPACE_DIR environment variable will be present.
@@ -101,20 +101,20 @@
     Ok(config)
 }
 
-#[derive(Debug, StructOpt)]
+#[derive(Debug, Parser)]
 struct Config {
     // If not specified, uses the result of `bazel info workspace`.
-    #[structopt(long)]
+    #[clap(long)]
     workspace: Option<PathBuf>,
 
     // If not specified, uses the result of `bazel info execution_root`.
-    #[structopt(long)]
+    #[clap(long)]
     execution_root: Option<PathBuf>,
 
-    #[structopt(long, default_value = "bazel")]
+    #[clap(long, default_value = "bazel")]
     bazel: PathBuf,
 
     // Space separated list of target patterns that comes after all other args.
-    #[structopt(default_value = "@//...")]
+    #[clap(default_value = "@//...")]
     targets: Vec<String>,
 }