Repository: rust-analyzer/rust-analyzer
Pull request #10938 (2021-12-05 11:39:56)

minor: Bump d3


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index df01cd74fe..5a62bccf6b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -37,9 +37,9 @@ dependencies = [
 
 [[package]]
 name = "anyhow"
-version = "1.0.51"
+version = "1.0.45"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203"
+checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7"
 
 [[package]]
 name = "anymap"
@@ -49,9 +49,9 @@ checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
 
 [[package]]
 name = "arbitrary"
-version = "1.0.3"
+version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "510c76ecefdceada737ea728f4f9a84bd2e1ef29f1ba555e560940fe279954de"
+checksum = "577b08a4acd7b99869f863c50011b01eb73424ccc798ecd996f2e24817adfca7"
 
 [[package]]
 name = "arrayvec"
@@ -145,9 +145,9 @@ dependencies = [
 
 [[package]]
 name = "cc"
-version = "1.0.72"
+version = "1.0.71"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
+checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd"
 
 [[package]]
 name = "cfg"
@@ -171,9 +171,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
 
 [[package]]
 name = "chalk-derive"
-version = "0.74.0"
+version = "0.73.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09d8c85134e234bead3fb78e4abd3ca2bdc228e5897b7f0fcd5265c4f4294375"
+checksum = "3f182e4c40ae0a36afff9904e46389df47d2f943bae70eab3d779c87aa5dd584"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -183,9 +183,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-ir"
-version = "0.74.0"
+version = "0.73.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b08046b4a060d3fbf9df521a3aca331ff14d0a50c184b09a7b80edca1bf2aa79"
+checksum = "5f998dcab9f6975ce5fe69c28acba246f75f82c1a8faa4455facac82ee61bc14"
 dependencies = [
  "bitflags",
  "chalk-derive",
@@ -194,9 +194,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-recursive"
-version = "0.74.0"
+version = "0.73.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8d0190d6f86bdd3395fb4482879cda3e40a14a4c32241805301fb079fd7b62c"
+checksum = "c56b019577ff31fc12748cbe2ddcec47d2b9e647f98cce146bfeb69ad2263fb4"
 dependencies = [
  "chalk-derive",
  "chalk-ir",
@@ -207,9 +207,9 @@ dependencies = [
 
 [[package]]
 name = "chalk-solve"
-version = "0.74.0"
+version = "0.73.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bb39cbb1887edb2e12513ad811bea9a70faf4f98f4de794c5899c2c2e43e1b4"
+checksum = "296c92cae565a4000e3eea00ece09e14ce24e6bdc14a5807d140a4cc7652b8d4"
 dependencies = [
  "chalk-derive",
  "chalk-ir",
@@ -225,12 +225,6 @@ name = "countme"
 version = "2.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "328b822bdcba4d4e402be8d9adb6eebf269f969f8eadef977a553ff3c4fbcb58"
-
-[[package]]
-name = "countme"
-version = "3.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03746e0c6dd9b5d2d9132ffe0bede35fb5f815604fd371bb42599fd37bc8e483"
 dependencies = [
  "dashmap",
  "once_cell",
@@ -245,9 +239,9 @@ checksum = "0d48d8f76bd9331f19fe2aaf3821a9f9fb32c3963e1e3d6ce82a8c09cef7444a"
 
 [[package]]
 name = "crc32fast"
-version = "1.3.0"
+version = "1.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836"
+checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
 dependencies = [
  "cfg-if",
 ]
@@ -352,9 +346,9 @@ dependencies = [
 
 [[package]]
 name = "expect-test"
-version = "1.2.1"
+version = "1.2.0-pre.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ffc5e8bf4af3ae147a7797c5d0566d9f038e49179213e29f44ddb031aea96c7"
+checksum = "3a2f1664bc69648747878bfe3430ad9b58bc8d9b50b3b1df9f3c081345e33197"
 dependencies = [
  "dissimilar",
  "once_cell",
@@ -812,15 +806,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
 
 [[package]]
 name = "libc"
-version = "0.2.108"
+version = "0.2.107"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119"
+checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
 
 [[package]]
 name = "libloading"
-version = "0.7.2"
+version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52"
+checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0"
 dependencies = [
  "cfg-if",
  "winapi",
@@ -828,9 +822,9 @@ dependencies = [
 
 [[package]]
 name = "libmimalloc-sys"
-version = "0.1.23"
+version = "0.1.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9636c194f9db483f4d0adf2f99a65011a99f904bd222bbd67fb4df4f37863c30"
+checksum = "1d1b8479c593dba88c2741fc50b92e13dbabbbe0bd504d979f244ccc1a5b1c01"
 dependencies = [
  "cc",
 ]
@@ -930,18 +924,18 @@ dependencies = [
 
 [[package]]
 name = "memoffset"
-version = "0.6.5"
+version = "0.6.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9"
 dependencies = [
  "autocfg",
 ]
 
 [[package]]
 name = "mimalloc"
-version = "0.1.27"
+version = "0.1.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf5f78c1d9892fb5677a8b2f543f967ab891ac0f71feecd961435b74f877283a"
+checksum = "fb74897ce508e6c49156fd1476fc5922cbc6e75183c65e399c765a09122e5130"
 dependencies = [
  "libmimalloc-sys",
 ]
@@ -964,7 +958,7 @@ checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
 dependencies = [
  "libc",
  "log",
- "miow 0.3.7",
+ "miow",
  "ntapi",
  "winapi",
 ]
@@ -978,15 +972,6 @@ dependencies = [
  "winapi",
 ]
 
-[[package]]
-name = "miow"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7377f7792b3afb6a3cba68daa54ca23c032137010460d667fda53a8d66be00e"
-dependencies = [
- "windows-sys",
-]
-
 [[package]]
 name = "notify"
 version = "5.0.0-pre.13"
@@ -1186,7 +1171,7 @@ name = "profile"
 version = "0.0.0"
 dependencies = [
  "cfg-if",
- "countme 3.0.0",
+ "countme",
  "la-arena",
  "libc",
  "once_cell",
@@ -1229,9 +1214,9 @@ dependencies = [
 
 [[package]]
 name = "pulldown-cmark-to-cmark"
-version = "7.1.0"
+version = "6.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d85e607de0249c2b5041e38de8684b00b62a64edee60bfcd85c153031a9d658"
+checksum = "1f5925e2c68fb0c3c189cd0f6bbcf1e16402a070d4fcaf7600e239e8302dd0e8"
 dependencies = [
  "pulldown-cmark",
 ]
@@ -1309,7 +1294,7 @@ version = "0.14.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4f77412a3d1f26af0c0783c23b3555a301b1a49805cba7bf9a7827a9e9e285f0"
 dependencies = [
- "countme 2.0.4",
+ "countme",
  "hashbrown",
  "memoffset",
  "rustc-hash",
@@ -1391,9 +1376,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
 
 [[package]]
 name = "ryu"
-version = "1.0.6"
+version = "1.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568"
+checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
 
 [[package]]
 name = "salsa"
@@ -1476,9 +1461,9 @@ dependencies = [
 
 [[package]]
 name = "serde_json"
-version = "1.0.72"
+version = "1.0.69"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527"
+checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8"
 dependencies = [
  "indexmap",
  "itoa",
@@ -1541,15 +1526,15 @@ dependencies = [
  "always-assert",
  "backtrace",
  "libc",
- "miow 0.4.0",
+ "miow",
  "winapi",
 ]
 
 [[package]]
 name = "syn"
-version = "1.0.82"
+version = "1.0.81"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
+checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1593,6 +1578,15 @@ dependencies = [
  "ungrammar",
 ]
 
+[[package]]
+name = "termcolor"
+version = "1.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
+dependencies = [
+ "winapi-util",
+]
+
 [[package]]
 name = "test_utils"
 version = "0.0.0"
@@ -1669,9 +1663,9 @@ dependencies = [
 
 [[package]]
 name = "tinyvec"
-version = "1.5.1"
+version = "1.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
+checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7"
 dependencies = [
  "tinyvec_macros",
 ]
@@ -1750,12 +1744,13 @@ dependencies = [
 
 [[package]]
 name = "tracing-tree"
-version = "0.1.11"
+version = "0.1.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2a408a91fbd4850982080e643a261aef2a2ef72c8263ce353b61d25acfc2c49"
+checksum = "4d850f81a21b3877d4360a079c35b7b78f2674f2dafa5c9d381c53c65acebea3"
 dependencies = [
  "ansi_term",
  "atty",
+ "termcolor",
  "tracing-core",
  "tracing-log",
  "tracing-subscriber",
@@ -1895,49 +1890,6 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
 
-[[package]]
-name = "windows-sys"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82ca39602d5cbfa692c4b67e3bcbb2751477355141c1ed434c94da4186836ff6"
-dependencies = [
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_msvc",
-]
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52695a41e536859d5308cc613b4a022261a274390b25bd29dfff4bf08505f3c2"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f54725ac23affef038fecb177de6c9bf065787c2f432f79e3c373da92f3e1d8a"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d5158a43cc43623c0729d1ad6647e62fa384a3d135fd15108d37c683461f64"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc31f409f565611535130cfe7ee8e6655d3fa99c1c61013981e491921b5ce954"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.28.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f2b8c7cbd3bfdddd9ab98769f9746a7fad1bca236554cd032b78d768bc0e89f"
-
 [[package]]
 name = "write-json"
 version = "0.1.2"
diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml
index 4ec8749f87..48820d8c83 100644
--- a/crates/hir_ty/Cargo.toml
+++ b/crates/hir_ty/Cargo.toml
@@ -18,9 +18,9 @@ ena = "0.14.0"
 tracing = "0.1"
 rustc-hash = "1.1.0"
 scoped-tls = "1"
-chalk-solve = { version = "0.74", default-features = false }
-chalk-ir = "0.74"
-chalk-recursive = { version = "0.74", default-features = false }
+chalk-solve = { version = "0.73", default-features = false }
+chalk-ir = "0.73"
+chalk-recursive = { version = "0.73", default-features = false }
 la-arena = { version = "0.3.0", path = "../../lib/arena" }
 once_cell = { version = "1.5.0" }
 
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs
index 88f9d6a311..852e545bd0 100644
--- a/crates/hir_ty/src/infer/unify.rs
+++ b/crates/hir_ty/src/infer/unify.rs
@@ -3,8 +3,8 @@
 use std::{fmt, mem, sync::Arc};
 
 use chalk_ir::{
-    cast::Cast, fold::Fold, interner::HasInterner, zip::Zip, FloatTy, IntTy, NoSolution,
-    TyVariableKind, UniverseIndex,
+    cast::Cast, fold::Fold, interner::HasInterner, zip::Zip, FloatTy, IntTy, TyVariableKind,
+    UniverseIndex,
 };
 use chalk_solve::infer::ParameterEnaVariableExt;
 use ena::unify::UnifyKey;
@@ -412,9 +412,7 @@ impl<'a> InferenceTable<'a> {
             highest_known_var: InferenceVar,
         }
         impl<'a, 'b> Folder<'static, Interner> for VarFudger<'a, 'b> {
-            type Error = NoSolution;
-
-            fn as_dyn(&mut self) -> &mut dyn Folder<'static, Interner, Error = Self::Error> {
+            fn as_dyn(&mut self) -> &mut dyn Folder<'static, Interner> {
                 self
             }
 
@@ -540,7 +538,7 @@ mod resolve {
     use chalk_ir::{
         cast::Cast,
         fold::{Fold, Folder},
-        Fallible, NoSolution,
+        Fallible,
     };
     use hir_def::type_ref::ConstScalar;
 
@@ -553,9 +551,7 @@ mod resolve {
     where
         F: Fn(InferenceVar, VariableKind, GenericArg, DebruijnIndex) -> GenericArg + 'i,
     {
-        type Error = NoSolution;
-
-        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
+        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
             self
         }
 
diff --git a/crates/hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs
index 320b170ee4..f59e109c85 100644
--- a/crates/hir_ty/src/lib.rs
+++ b/crates/hir_ty/src/lib.rs
@@ -35,7 +35,7 @@ use std::sync::Arc;
 use chalk_ir::{
     fold::{Fold, Shift},
     interner::HasInterner,
-    NoSolution, UintTy,
+    UintTy,
 };
 use hir_def::{
     expr::ExprId,
@@ -228,11 +228,11 @@ impl CallableSig {
 impl Fold<Interner> for CallableSig {
     type Result = CallableSig;
 
-    fn fold_with<'i, E>(
+    fn fold_with<'i>(
         self,
-        folder: &mut dyn chalk_ir::fold::Folder<'i, Interner, Error = E>,
+        folder: &mut dyn chalk_ir::fold::Folder<'i, Interner>,
         outer_binder: DebruijnIndex,
-    ) -> Result<Self::Result, E>
+    ) -> chalk_ir::Fallible<Self::Result>
     where
         Interner: 'i,
     {
@@ -282,9 +282,7 @@ pub(crate) fn fold_free_vars<T: HasInterner<Interner = Interner> + Fold<Interner
     use chalk_ir::{fold::Folder, Fallible};
     struct FreeVarFolder<F>(F);
     impl<'i, F: FnMut(BoundVar, DebruijnIndex) -> Ty + 'i> Folder<'i, Interner> for FreeVarFolder<F> {
-        type Error = NoSolution;
-
-        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
+        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
             self
         }
 
@@ -314,9 +312,7 @@ pub(crate) fn fold_tys<T: HasInterner<Interner = Interner> + Fold<Interner>>(
     };
     struct TyFolder<F>(F);
     impl<'i, F: FnMut(Ty, DebruijnIndex) -> Ty + 'i> Folder<'i, Interner> for TyFolder<F> {
-        type Error = NoSolution;
-
-        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
+        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
             self
         }
 
@@ -342,15 +338,13 @@ where
 {
     use chalk_ir::{
         fold::{Folder, SuperFold},
-        Fallible,
+        Fallible, NoSolution,
     };
     struct ErrorReplacer {
         vars: usize,
     }
     impl<'i> Folder<'i, Interner> for ErrorReplacer {
-        type Error = NoSolution;
-
-        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner, Error = Self::Error> {
+        fn as_dyn(&mut self) -> &mut dyn Folder<'i, Interner> {
             self
         }
 
diff --git a/crates/ide/Cargo.toml b/crates/ide/Cargo.toml
index 0f3311cb71..3403b5a631 100644
--- a/crates/ide/Cargo.toml
+++ b/crates/ide/Cargo.toml
@@ -16,7 +16,7 @@ itertools = "0.10.0"
 tracing = "0.1"
 rustc-hash = "1.1.0"
 oorandom = "11.1.2"
-pulldown-cmark-to-cmark = "7.1"
+pulldown-cmark-to-cmark = "6.0.0"
 pulldown-cmark = { version = "0.8.0", default-features = false }
 url = "2.1.1"
 dot = "0.1.4"
diff --git a/crates/ide/src/doc_links.rs b/crates/ide/src/doc_links.rs
index df25d80178..617f63d358 100644
--- a/crates/ide/src/doc_links.rs
+++ b/crates/ide/src/doc_links.rs
@@ -62,7 +62,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: Defin
         doc,
         &mut out,
         None,
-        CMarkOptions { code_block_token_count: 3, ..Default::default() },
+        CMarkOptions { code_block_backticks: 3, ..Default::default() },
     )
     .ok();
     out
@@ -98,7 +98,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
         doc,
         &mut out,
         None,
-        CMarkOptions { code_block_token_count: 3, ..Default::default() },
+        CMarkOptions { code_block_backticks: 3, ..Default::default() },
     )
     .ok();
     out
diff --git a/crates/ide/src/navigation_target.rs b/crates/ide/src/navigation_target.rs
index d97e52200d..49ff3625ca 100644
--- a/crates/ide/src/navigation_target.rs
+++ b/crates/ide/src/navigation_target.rs
@@ -363,13 +363,7 @@ impl TryToNav for hir::MacroDef {
         let mut res = NavigationTarget::from_named(
             db,
             src.as_ref().with_value(name_owner),
-            match self.kind() {
-                hir::MacroKind::Declarative
-                | hir::MacroKind::BuiltIn
-                | hir::MacroKind::ProcMacro => SymbolKind::Macro,
-                hir::MacroKind::Derive => SymbolKind::Derive,
-                hir::MacroKind::Attr => SymbolKind::Attribute,
-            },
+            SymbolKind::Macro,
         );
         res.docs = self.docs(db);
         Some(res)
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs
index 0741e1ffbf..56e07da0b9 100644
--- a/crates/ide/src/syntax_highlighting.rs
+++ b/crates/ide/src/syntax_highlighting.rs
@@ -57,11 +57,9 @@ pub struct HlRange {
 // - For items:
 // +
 // [horizontal]
-// attribute:: Emitted for attribute macros.
 // enum:: Emitted for enums.
 // function:: Emitted for free-standing functions.
-// derive:: Emitted for derive macros.
-// macro:: Emitted for function-like macros.
+// macro:: Emitted for macros.
 // method:: Emitted for associated functions, also knowns as methods.
 // namespace:: Emitted for modules.
 // struct:: Emitted for structs.
@@ -92,7 +90,6 @@ pub struct HlRange {
 // +
 // [horizontal]
 // punctuation:: Emitted for general punctuation.
-// attributeBracket:: Emitted for attribute invocation brackets, that is the `#[` and `]` tokens.
 // angle:: Emitted for `<>` angle brackets.
 // brace:: Emitted for `{}` braces.
 // bracket:: Emitted for `[]` brackets.
@@ -105,6 +102,7 @@ pub struct HlRange {
 // //-
 //
 // [horizontal]
+// attribute:: Emitted for the `#[` `]` tokens.
 // builtinAttribute:: Emitted for names to builtin attributes in attribute path, the `repr` in `#[repr(u8)]` for example.
 // builtinType:: Emitted for builtin types like `u32`, `str` and `f32`.
 // comment:: Emitted for comments.
diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs
index a52b2247c5..34c4ccd4c7 100644
--- a/crates/ide/src/syntax_highlighting/highlight.rs
+++ b/crates/ide/src/syntax_highlighting/highlight.rs
@@ -133,7 +133,7 @@ fn token(
                 _ if parent_matches::<ast::RangeExpr>(&token) => HlOperator::Other.into(),
                 _ if parent_matches::<ast::RangePat>(&token) => HlOperator::Other.into(),
                 _ if parent_matches::<ast::RestPat>(&token) => HlOperator::Other.into(),
-                _ if parent_matches::<ast::Attr>(&token) => HlTag::AttributeBracket.into(),
+                _ if parent_matches::<ast::Attr>(&token) => HlTag::Attribute.into(),
                 kind => match kind {
                     T!['['] | T![']'] => HlPunct::Bracket,
                     T!['{'] | T!['}'] => HlPunct::Brace,
@@ -200,7 +200,7 @@ fn node(
                 return None;
             },
             ast::Attr(__) => {
-                HlTag::AttributeBracket.into()
+                HlTag::Attribute.into()
             },
             // Highlight definitions depending on the "type" of the definition.
             ast::Name(name) => {
@@ -244,78 +244,77 @@ fn highlight_name_ref(
     name_ref: ast::NameRef,
 ) -> Highlight {
     let db = sema.db;
-    if let Some(res) = highlight_method_call_by_name_ref(sema, krate, &name_ref) {
-        return res;
-    }
-
-    let name_class = match NameRefClass::classify(sema, &name_ref) {
-        Some(name_kind) => name_kind,
-        None if syntactic_name_ref_highlighting => {
-            return highlight_name_ref_by_syntax(name_ref, sema, krate)
-        }
-        // FIXME: Workaround for https://github.com/rust-analyzer/rust-analyzer/issues/10708
-        //
-        // Some popular proc macros (namely async_trait) will rewrite `self` in such a way that it no
-        // longer resolves via NameRefClass. If we can't be resolved, but we know we're a self token,
-        // within a function with a self param, pretend to still be `self`, rather than
-        // an unresolved reference.
-        None if name_ref.self_token().is_some() && is_in_fn_with_self_param(&name_ref) => {
-            return SymbolKind::SelfParam.into()
-        }
-        // FIXME: This is required for helper attributes used by proc-macros, as those do not map down
-        // to anything when used.
-        // We can fix this for derive attributes since derive helpers are recorded, but not for
-        // general attributes.
-        None if name_ref.syntax().ancestors().any(|it| it.kind() == ATTR) => {
-            return HlTag::Symbol(SymbolKind::Attribute).into();
-        }
-        None => return HlTag::UnresolvedReference.into(),
-    };
-    let mut h = match name_class {
-        NameRefClass::Definition(def) => {
-            if let Definition::Local(local) = &def {
-                if let Some(name) = local.name(db) {
-                    let shadow_count = bindings_shadow_count.entry(name.clone()).or_default();
-                    *binding_hash = Some(calc_binding_hash(&name, *shadow_count))
-                }
-            };
+    highlight_method_call_by_name_ref(sema, krate, &name_ref).unwrap_or_else(|| {
+        let name_class = match NameRefClass::classify(sema, &name_ref) {
+            Some(name_kind) => name_kind,
+            None => {
+                return if syntactic_name_ref_highlighting {
+                    highlight_name_ref_by_syntax(name_ref, sema, krate)
+                } else {
+                    // FIXME: Workaround for https://github.com/rust-analyzer/rust-analyzer/issues/10708
+                    //
+                    // Some popular proc macros (namely async_trait) will rewrite `self` in such a way that it no
+                    // longer resolves via NameRefClass. If we can't be resolved, but we know we're a self token,
+                    // within a function with a self param, pretend to still be `self`, rather than
+                    // an unresolved reference.
+                    if name_ref.self_token().is_some() && is_in_fn_with_self_param(&name_ref) {
+                        SymbolKind::SelfParam.into()
+                    } else {
+                        HlTag::UnresolvedReference.into()
+                    }
+                };
+            }
+        };
+        let mut h = match name_class {
+            NameRefClass::Definition(def) => {
+                if let Definition::Local(local) = &def {
+                    if let Some(name) = local.name(db) {
+                        let shadow_count = bindings_shadow_count.entry(name.clone()).or_default();
+                        *binding_hash = Some(calc_binding_hash(&name, *shadow_count))
+                    }
+                };
 
-            let mut h = highlight_def(sema, krate, def);
+                let mut h = highlight_def(sema, krate, def);
 
-            match def {
-                Definition::Local(local) if is_consumed_lvalue(name_ref.syntax(), &local, db) => {
-                    h |= HlMod::Consuming;
-                }
-                Definition::Trait(trait_) if trait_.is_unsafe(db) => {
-                    if ast::Impl::for_trait_name_ref(&name_ref)
-                        .map_or(false, |impl_| impl_.unsafe_token().is_some())
+                match def {
+                    Definition::Local(local)
+                        if is_consumed_lvalue(name_ref.syntax(), &local, db) =>
                     {
-                        h |= HlMod::Unsafe;
+                        h |= HlMod::Consuming;
                     }
-                }
-                Definition::Field(field) => {
-                    if let Some(parent) = name_ref.syntax().parent() {
-                        if matches!(parent.kind(), FIELD_EXPR | RECORD_PAT_FIELD) {
-                            if let hir::VariantDef::Union(_) = field.parent_def(db) {
-                                h |= HlMod::Unsafe;
+                    Definition::Trait(trait_) if trait_.is_unsafe(db) => {
+                        if ast::Impl::for_trait_name_ref(&name_ref)
+                            .map_or(false, |impl_| impl_.unsafe_token().is_some())
+                        {
+                            h |= HlMod::Unsafe;
+                        }
+                    }
+                    Definition::Field(field) => {
+                        if let Some(parent) = name_ref.syntax().parent() {
+                            if matches!(parent.kind(), FIELD_EXPR | RECORD_PAT_FIELD) {
+                                if let hir::VariantDef::Union(_) = field.parent_def(db) {
+                                    h |= HlMod::Unsafe;
+                                }
                             }
                         }
                     }
+                    _ => (),
                 }
-                _ => (),
-            }
 
-            h
+                h
+            }
+            NameRefClass::FieldShorthand { .. } => SymbolKind::Field.into(),
+        };
+        if h.tag == HlTag::Symbol(SymbolKind::Module) {
+            if name_ref.self_token().is_some() {
+                return SymbolKind::SelfParam.into();
+            }
+            if name_ref.crate_token().is_some() || name_ref.super_token().is_some() {
+                h.tag = HlTag::Keyword;
+            }
         }
-        NameRefClass::FieldShorthand { .. } => SymbolKind::Field.into(),
-    };
-    if name_ref.self_token().is_some() {
-        h.tag = HlTag::Symbol(SymbolKind::SelfParam);
-    }
-    if name_ref.crate_token().is_some() || name_ref.super_token().is_some() {
-        h.tag = HlTag::Keyword;
-    }
-    h
+        h
+    })
 }
 
 fn highlight_name(
@@ -375,13 +374,7 @@ fn highlight_def(
 ) -> Highlight {
     let db = sema.db;
     let mut h = match def {
-        Definition::Macro(m) => Highlight::new(HlTag::Symbol(match m.kind() {
-            hir::MacroKind::Declarative | hir::MacroKind::BuiltIn | hir::MacroKind::ProcMacro => {
-                SymbolKind::Macro
-            }
-            hir::MacroKind::Derive => SymbolKind::Derive,
-            hir::MacroKind::Attr => SymbolKind::Attribute,
-        })),
+        Definition::Macro(_) => Highlight::new(HlTag::Symbol(SymbolKind::Macro)),
         Definition::Field(_) => Highlight::new(HlTag::Symbol(SymbolKind::Field)),
         Definition::Module(module) => {
             let mut h = Highlight::new(HlTag::Symbol(SymbolKind::Module));
diff --git a/crates/ide/src/syntax_highlighting/tags.rs b/crates/ide/src/syntax_highlighting/tags.rs
index 7216eae0eb..3e0a78392a 100644
--- a/crates/ide/src/syntax_highlighting/tags.rs
+++ b/crates/ide/src/syntax_highlighting/tags.rs
@@ -18,7 +18,7 @@ pub struct HlMods(u32);
 pub enum HlTag {
     Symbol(SymbolKind),
 
-    AttributeBracket,
+    Attribute,
     BoolLiteral,
     BuiltinType,
     ByteLiteral,
@@ -124,11 +124,9 @@ impl HlTag {
     fn as_str(self) -> &'static str {
         match self {
             HlTag::Symbol(symbol) => match symbol {
-                SymbolKind::Attribute => "attribute",
                 SymbolKind::BuiltinAttr => "builtin_attr",
                 SymbolKind::Const => "constant",
                 SymbolKind::ConstParam => "const_param",
-                SymbolKind::Derive => "derive",
                 SymbolKind::Enum => "enum",
                 SymbolKind::Field => "field",
                 SymbolKind::Function => "function",
@@ -149,7 +147,7 @@ impl HlTag {
                 SymbolKind::ValueParam => "value_param",
                 SymbolKind::Variant => "enum_variant",
             },
-            HlTag::AttributeBracket => "attribute_bracket",
+            HlTag::Attribute => "attribute",
             HlTag::BoolLiteral => "bool_literal",
             HlTag::BuiltinType => "builtin_type",
             HlTag::ByteLiteral => "byte_literal",
diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs
index f09015efb6..8740db326b 100644
--- a/crates/ide_completion/src/completions/attribute.rs
+++ b/crates/ide_completion/src/completions/attribute.rs
@@ -4,19 +4,20 @@
 //! for built-in attributes.
 
 use hir::HasAttrs;
-use ide_db::{
-    helpers::{
-        generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES, RUSTDOC_LINTS},
-        parse_tt_as_comma_sep_paths,
-    },
-    SymbolKind,
+use ide_db::helpers::{
+    generated_lints::{CLIPPY_LINTS, DEFAULT_LINTS, FEATURES, RUSTDOC_LINTS},
+    parse_tt_as_comma_sep_paths,
 };
 use itertools::Itertools;
 use once_cell::sync::Lazy;
 use rustc_hash::FxHashMap;
 use syntax::{algo::non_trivia_sibling, ast, AstNode, Direction, SyntaxKind, T};
 
-use crate::{context::CompletionContext, item::CompletionItem, Completions};
+use crate::{
+    context::CompletionContext,
+    item::{CompletionItem, CompletionItemKind},
+    Completions,
+};
 
 mod cfg;
 mod derive;
@@ -72,8 +73,11 @@ fn complete_new_attribute(acc: &mut Completions, ctx: &CompletionContext, attrib
     });
 
     let add_completion = |attr_completion: &AttrCompletion| {
-        let mut item =
-            CompletionItem::new(SymbolKind::Attribute, ctx.source_range(), attr_completion.label);
+        let mut item = CompletionItem::new(
+            CompletionItemKind::Attribute,
+            ctx.source_range(),
+            attr_completion.label,
+        );
 
         if let Some(lookup) = attr_completion.lookup {
             item.lookup_by(lookup);
@@ -103,7 +107,7 @@ fn complete_new_attribute(acc: &mut Completions, ctx: &CompletionContext, attrib
         if let hir::ScopeDef::MacroDef(mac) = scope_def {
             if mac.kind() == hir::MacroKind::Attr {
                 let mut item = CompletionItem::new(
-                    SymbolKind::Attribute,
+                    CompletionItemKind::Attribute,
                     ctx.source_range(),
                     name.to_smol_str(),
                 );
diff --git a/crates/ide_completion/src/completions/attribute/cfg.rs b/crates/ide_completion/src/completions/attribute/cfg.rs
index e53bf49174..1a10531a1b 100644
--- a/crates/ide_completion/src/completions/attribute/cfg.rs
+++ b/crates/ide_completion/src/completions/attribute/cfg.rs
@@ -2,14 +2,16 @@
 
 use std::iter;
 
-use ide_db::SymbolKind;
 use syntax::SyntaxKind;
 
-use crate::{completions::Completions, context::CompletionContext, CompletionItem};
+use crate::{
+    completions::Completions, context::CompletionContext, CompletionItem, CompletionItemKind,
+};
 
 pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext) {
     let add_completion = |item: &str| {
-        let mut completion = CompletionItem::new(SymbolKind::BuiltinAttr, ctx.source_range(), item);
+        let mut completion =
+            CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), item);
         completion.insert_text(format!(r#""{}""#, item));
         acc.add(completion.build());
     };
@@ -32,7 +34,7 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext) {
                 krate.potential_cfg(ctx.db).get_cfg_values(&name).cloned().for_each(|s| {
                     let insert_text = format!(r#""{}""#, s);
                     let mut item =
-                        CompletionItem::new(SymbolKind::BuiltinAttr, ctx.source_range(), s);
+                        CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), s);
                     item.insert_text(insert_text);
 
                     acc.add(item.build());
@@ -42,7 +44,8 @@ pub(crate) fn complete_cfg(acc: &mut Completions, ctx: &CompletionContext) {
         None => {
             if let Some(krate) = ctx.krate {
                 krate.potential_cfg(ctx.db).get_cfg_keys().cloned().for_each(|s| {
-                    let item = CompletionItem::new(SymbolKind::BuiltinAttr, ctx.source_range(), s);
+                    let item =
+                        CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), s);
                     acc.add(item.build());
                 })
             }
diff --git a/crates/ide_completion/src/completions/attribute/derive.rs b/crates/ide_completion/src/completions/attribute/derive.rs
index 0daf114788..b9032318ec 100644
--- a/crates/ide_completion/src/completions/attribute/derive.rs
+++ b/crates/ide_completion/src/completions/attribute/derive.rs
@@ -1,16 +1,15 @@
 //! Completion for derives
 use hir::{HasAttrs, MacroDef, MacroKind};
-use ide_db::{
-    helpers::{import_assets::ImportAssets, insert_use::ImportScope, FamousDefs},
-    SymbolKind,
-};
+use ide_db::helpers::{import_assets::ImportAssets, insert_use::ImportScope, FamousDefs};
 use itertools::Itertools;
 use rustc_hash::FxHashSet;
 use syntax::{ast, SmolStr, SyntaxKind};
 
 use crate::{
-    completions::flyimport::compute_fuzzy_completion_order_key, context::CompletionContext,
-    item::CompletionItem, Completions, ImportEdit,
+    completions::flyimport::compute_fuzzy_completion_order_key,
+    context::CompletionContext,
+    item::{CompletionItem, CompletionItemKind},
+    Completions, ImportEdit,
 };
 
 pub(super) fn complete_derive(
@@ -57,7 +56,8 @@ pub(super) fn complete_derive(
             _ => (name, None),
         };
 
-        let mut item = CompletionItem::new(SymbolKind::Derive, ctx.source_range(), label);
+        let mut item =
+            CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), label);
         if let Some(docs) = mac.docs(ctx.db) {
             item.documentation(docs);
         }
@@ -67,7 +67,7 @@ pub(super) fn complete_derive(
         item.add_to(acc);
     }
 
-    flyimport_derive(acc, ctx);
+    flyimport_attribute(acc, ctx);
 }
 
 fn get_derives_in_scope(ctx: &CompletionContext) -> Vec<(hir::Name, MacroDef)> {
@@ -82,7 +82,7 @@ fn get_derives_in_scope(ctx: &CompletionContext) -> Vec<(hir::Name, MacroDef)> {
     result
 }
 
-fn flyimport_derive(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
+fn flyimport_attribute(acc: &mut Completions, ctx: &CompletionContext) -> Option<()> {
     if ctx.token.kind() != SyntaxKind::IDENT {
         return None;
     };
@@ -106,14 +106,13 @@ fn flyimport_derive(acc: &mut Completions, ctx: &CompletionContext) -> Option<()
                 hir::ItemInNs::Macros(mac) => Some((import, mac)),
                 _ => None,
             })
-            .filter(|&(_, mac)| mac.kind() == MacroKind::Derive)
             .filter(|&(_, mac)| !ctx.is_item_hidden(&hir::ItemInNs::Macros(mac)))
             .sorted_by_key(|(import, _)| {
                 compute_fuzzy_completion_order_key(&import.import_path, &user_input_lowercased)
             })
             .filter_map(|(import, mac)| {
                 let mut item = CompletionItem::new(
-                    SymbolKind::Derive,
+                    CompletionItemKind::Attribute,
                     ctx.source_range(),
                     mac.name(ctx.db)?.to_smol_str(),
                 );
diff --git a/crates/ide_completion/src/completions/attribute/lint.rs b/crates/ide_completion/src/completions/attribute/lint.rs
index e2477423a2..05a29dd0ae 100644
--- a/crates/ide_completion/src/completions/attribute/lint.rs
+++ b/crates/ide_completion/src/completions/attribute/lint.rs
@@ -1,8 +1,12 @@
 //! Completion for lints
-use ide_db::{helpers::generated_lints::Lint, SymbolKind};
+use ide_db::helpers::generated_lints::Lint;
 use syntax::{ast, T};
 
-use crate::{context::CompletionContext, item::CompletionItem, Completions};
+use crate::{
+    context::CompletionContext,
+    item::{CompletionItem, CompletionItemKind},
+    Completions,
+};
 
 pub(super) fn complete_lint(
     acc: &mut Completions,
@@ -54,7 +58,8 @@ pub(super) fn complete_lint(
             Some(qual) if !is_qualified => format!("{}::{}", qual, name),
             _ => name.to_owned(),
         };
-        let mut item = CompletionItem::new(SymbolKind::Attribute, ctx.source_range(), label);
+        let mut item =
+            CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), label);
         item.documentation(hir::Documentation::new(description.to_owned()));
         item.add_to(acc)
     }
diff --git a/crates/ide_completion/src/completions/attribute/repr.rs b/crates/ide_completion/src/completions/attribute/repr.rs
index 805038091c..c240912f02 100644
--- a/crates/ide_completion/src/completions/attribute/repr.rs
+++ b/crates/ide_completion/src/completions/attribute/repr.rs
@@ -1,9 +1,12 @@
 //! Completion for representations.
 
-use ide_db::SymbolKind;
 use syntax::ast;
 
-use crate::{context::CompletionContext, item::CompletionItem, Completions};
+use crate::{
+    context::CompletionContext,
+    item::{CompletionItem, CompletionItemKind},
+    Completions,
+};
 
 pub(super) fn complete_repr(acc: &mut Completions, ctx: &CompletionContext, input: ast::TokenTree) {
     if let Some(existing_reprs) = super::parse_comma_sep_expr(input) {
@@ -26,7 +29,8 @@ pub(super) fn complete_repr(acc: &mut Completions, ctx: &CompletionContext, inpu
                 continue;
             }
 
-            let mut item = CompletionItem::new(SymbolKind::BuiltinAttr, ctx.source_range(), label);
+            let mut item =
+                CompletionItem::new(CompletionItemKind::Attribute, ctx.source_range(), label);
             if let Some(lookup) = lookup {
                 item.lookup_by(lookup);
             }
diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs
index 4a6e034dc9..b3f404d905 100644
--- a/crates/ide_completion/src/item.rs
+++ b/crates/ide_completion/src/item.rs
@@ -216,6 +216,7 @@ impl CompletionRelevance {
 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
 pub enum CompletionItemKind {
     SymbolKind(SymbolKind),
+    Attribute,
     Binding,
     BuiltinType,
     Keyword,
@@ -231,11 +232,9 @@ impl CompletionItemKind {
     pub(crate) fn tag(&self) -> &'static str {
         match self {
             CompletionItemKind::SymbolKind(kind) => match kind {
-                SymbolKind::Attribute => "at",
                 SymbolKind::BuiltinAttr => "ba",
                 SymbolKind::Const => "ct",
                 SymbolKind::ConstParam => "cp",
-                SymbolKind::Derive => "de",
                 SymbolKind::Enum => "en",
                 SymbolKind::Field => "fd",
                 SymbolKind::Function => "fn",
@@ -256,6 +255,7 @@ impl CompletionItemKind {
                 SymbolKind::ValueParam => "vp",
                 SymbolKind::Variant => "ev",
             },
+            CompletionItemKind::Attribute => "at",
             CompletionItemKind::Binding => "bn",
             CompletionItemKind::BuiltinType => "bt",
             CompletionItemKind::Keyword => "kw",
diff --git a/crates/ide_db/src/lib.rs b/crates/ide_db/src/lib.rs
index 0d14c176b5..67f23536bd 100644
--- a/crates/ide_db/src/lib.rs
+++ b/crates/ide_db/src/lib.rs
@@ -145,11 +145,9 @@ fn line_index(db: &dyn LineIndexDatabase, file_id: FileId) -> Arc<LineIndex> {
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
 pub enum SymbolKind {
-    Attribute,
     BuiltinAttr,
     Const,
     ConstParam,
-    Derive,
     Enum,
     Field,
     Function,
diff --git a/crates/profile/Cargo.toml b/crates/profile/Cargo.toml
index b16a3951c2..1d4f6d9147 100644
--- a/crates/profile/Cargo.toml
+++ b/crates/profile/Cargo.toml
@@ -14,7 +14,7 @@ once_cell = "1.3.1"
 cfg-if = "1"
 libc = "0.2"
 la-arena = { version = "0.3.0", path = "../../lib/arena" }
-countme = { version = "3.0", features = ["enable"] }
+countme = { version = "2.0.1", features = ["enable"] }
 jemalloc-ctl = { version = "0.4.1", package = "tikv-jemalloc-ctl", optional = true }
 
 [target.'cfg(target_os = "linux")'.dependencies]
diff --git a/crates/rust-analyzer/src/diagnostics.rs b/crates/rust-analyzer/src/diagnostics.rs
index 56b3afce98..2f63c26ce5 100644
--- a/crates/rust-analyzer/src/diagnostics.rs
+++ b/crates/rust-analyzer/src/diagnostics.rs
@@ -29,8 +29,7 @@ pub(crate) struct DiagnosticCollection {
 
 #[derive(Debug, Clone)]
 pub(crate) struct Fix {
-    // Fixes may be triggerable from multiple ranges.
-    pub(crate) ranges: Vec<lsp_types::Range>,
+    pub(crate) range: lsp_types::Range,
     pub(crate) action: lsp_ext::CodeAction,
 }
 
@@ -44,7 +43,7 @@ impl DiagnosticCollection {
         &mut self,
         file_id: FileId,
         diagnostic: lsp_types::Diagnostic,
-        fix: Option<Fix>,
+        fixes: Vec<lsp_ext::CodeAction>,
     ) {
         let diagnostics = self.check.entry(file_id).or_default();
         for existing_diagnostic in diagnostics.iter() {
@@ -54,7 +53,10 @@ impl DiagnosticCollection {
         }
 
         let check_fixes = Arc::make_mut(&mut self.check_fixes);
-        check_fixes.entry(file_id).or_default().extend(fix);
+        check_fixes
+            .entry(file_id)
+            .or_default()
+            .extend(fixes.into_iter().map(|action| Fix { range: diagnostic.range, action }));
         diagnostics.push(diagnostic);
         self.changes.insert(file_id);
     }
diff --git a/crates/rust-analyzer/src/diagnostics/to_proto.rs b/crates/rust-analyzer/src/diagnostics/to_proto.rs
index 5f936ee086..bdc56b3196 100644
--- a/crates/rust-analyzer/src/diagnostics/to_proto.rs
+++ b/crates/rust-analyzer/src/diagnostics/to_proto.rs
@@ -9,7 +9,7 @@ use vfs::{AbsPath, AbsPathBuf};
 
 use crate::{lsp_ext, to_proto::url_from_abs_path};
 
-use super::{DiagnosticsMapConfig, Fix};
+use super::DiagnosticsMapConfig;
 
 /// Determines the LSP severity from a diagnostic
 fn diagnostic_severity(
@@ -124,7 +124,7 @@ fn resolve_path(
 
 struct SubDiagnostic {
     related: lsp_types::DiagnosticRelatedInformation,
-    suggested_fix: Option<Fix>,
+    suggested_fix: Option<lsp_ext::CodeAction>,
 }
 
 enum MappedRustChildDiagnostic {
@@ -181,24 +181,18 @@ fn map_rust_child_diagnostic(
                 location: location(config, workspace_root, spans[0]),
                 message: message.clone(),
             },
-            suggested_fix: Some(Fix {
-                ranges: spans
-                    .iter()
-                    .map(|&span| location(config, workspace_root, span).range)
-                    .collect(),
-                action: lsp_ext::CodeAction {
-                    title: message,
-                    group: None,
-                    kind: Some(lsp_types::CodeActionKind::QUICKFIX),
-                    edit: Some(lsp_ext::SnippetWorkspaceEdit {
-                        // FIXME: there's no good reason to use edit_map here....
-                        changes: Some(edit_map),
-                        document_changes: None,
-                        change_annotations: None,
-                    }),
-                    is_preferred: Some(true),
-                    data: None,
-                },
+            suggested_fix: Some(lsp_ext::CodeAction {
+                title: message,
+                group: None,
+                kind: Some(lsp_types::CodeActionKind::QUICKFIX),
+                edit: Some(lsp_ext::SnippetWorkspaceEdit {
+                    // FIXME: there's no good reason to use edit_map here....
+                    changes: Some(edit_map),
+                    document_changes: None,
+                    change_annotations: None,
+                }),
+                is_preferred: Some(true),
+                data: None,
             }),
         })
     }
@@ -208,7 +202,7 @@ fn map_rust_child_diagnostic(
 pub(crate) struct MappedRustDiagnostic {
     pub(crate) url: lsp_types::Url,
     pub(crate) diagnostic: lsp_types::Diagnostic,
-    pub(crate) fix: Option<Fix>,
+    pub(crate) fixes: Vec<lsp_ext::CodeAction>,
 }
 
 /// Converts a Rust root diagnostic to LSP form
@@ -365,7 +359,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
                 diagnostics.push(MappedRustDiagnostic {
                     url: secondary_location.uri,
                     diagnostic,
-                    fix: None,
+                    fixes: Vec::new(),
                 });
             }
 
@@ -394,7 +388,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
                     tags: if tags.is_empty() { None } else { Some(tags.clone()) },
                     data: None,
                 },
-                fix: None,
+                fixes: Vec::new(),
             });
 
             // Emit hint-level diagnostics for all `related_information` entries such as "help"s.
@@ -411,7 +405,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
                 }
                 diagnostics.push(MappedRustDiagnostic {
                     url: sub.related.location.uri.clone(),
-                    fix: sub.suggested_fix.clone(),
+                    fixes: sub.suggested_fix.iter().cloned().collect(),
                     diagnostic: lsp_types::Diagnostic {
                         range: sub.related.location.range,
                         severity: Some(lsp_types::DiagnosticSeverity::HINT),
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index bf153012d9..0ddddeca67 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -1081,13 +1081,8 @@ pub(crate) fn handle_code_action(
     for fix in snap.check_fixes.get(&frange.file_id).into_iter().flatten() {
         // FIXME: this mapping is awkward and shouldn't exist. Refactor
         // `snap.check_fixes` to not convert to LSP prematurely.
-        let intersect_fix_range = fix
-            .ranges
-            .iter()
-            .copied()
-            .map(|range| from_proto::text_range(&line_index, range))
-            .any(|fix_range| fix_range.intersect(frange.range).is_some());
-        if intersect_fix_range {
+        let fix_range = from_proto::text_range(&line_index, fix.range);
+        if fix_range.intersect(frange.range).is_some() {
             res.push(fix.action.clone());
         }
     }
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index 2d83cbee66..979b3b1522 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -370,7 +370,7 @@ impl GlobalState {
                                     Ok(file_id) => self.diagnostics.add_check_diagnostic(
                                         file_id,
                                         diag.diagnostic,
-                                        diag.fix,
+                                        diag.fixes,
                                     ),
                                     Err(err) => {
                                         tracing::error!(
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs
index 1097a77afe..8e1ccfb397 100644
--- a/crates/rust-analyzer/src/semantic_tokens.rs
+++ b/crates/rust-analyzer/src/semantic_tokens.rs
@@ -41,7 +41,6 @@ define_semantic_token_types![
     (ANGLE, "angle"),
     (ARITHMETIC, "arithmetic"),
     (ATTRIBUTE, "attribute"),
-    (ATTRIBUTE_BRACKET, "attributeBracket"),
     (BITWISE, "bitwise"),
     (BOOLEAN, "boolean"),
     (BRACE, "brace"),
@@ -53,7 +52,6 @@ define_semantic_token_types![
     (COMMA, "comma"),
     (COMPARISON, "comparison"),
     (CONST_PARAMETER, "constParameter"),
-    (DERIVE, "derive"),
     (DOT, "dot"),
     (ESCAPE_SEQUENCE, "escapeSequence"),
     (FORMAT_SPECIFIER, "formatSpecifier"),
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index f8c46b92fa..579ad22bac 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -50,10 +50,7 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
         SymbolKind::Enum => lsp_types::SymbolKind::ENUM,
         SymbolKind::Variant => lsp_types::SymbolKind::ENUM_MEMBER,
         SymbolKind::Trait => lsp_types::SymbolKind::INTERFACE,
-        SymbolKind::Macro
-        | SymbolKind::BuiltinAttr
-        | SymbolKind::Attribute
-        | SymbolKind::Derive => lsp_types::SymbolKind::FUNCTION,
+        SymbolKind::Macro | SymbolKind::BuiltinAttr => lsp_types::SymbolKind::FUNCTION,
         SymbolKind::Module | SymbolKind::ToolModule => lsp_types::SymbolKind::MODULE,
         SymbolKind::TypeAlias | SymbolKind::TypeParam => lsp_types::SymbolKind::TYPE_PARAMETER,
         SymbolKind::Field => lsp_types::SymbolKind::FIELD,
@@ -103,6 +100,7 @@ pub(crate) fn completion_item_kind(
     completion_item_kind: CompletionItemKind,
 ) -> lsp_types::CompletionItemKind {
     match completion_item_kind {
+        CompletionItemKind::Attribute => lsp_types::CompletionItemKind::ENUM_MEMBER,
         CompletionItemKind::Binding => lsp_types::CompletionItemKind::VARIABLE,
         CompletionItemKind::BuiltinType => lsp_types::CompletionItemKind::STRUCT,
         CompletionItemKind::Keyword => lsp_types::CompletionItemKind::KEYWORD,
@@ -110,10 +108,8 @@ pub(crate) fn completion_item_kind(
         CompletionItemKind::Snippet => lsp_types::CompletionItemKind::SNIPPET,
         CompletionItemKind::UnresolvedReference => lsp_types::CompletionItemKind::REFERENCE,
         CompletionItemKind::SymbolKind(symbol) => match symbol {
-            SymbolKind::Attribute => lsp_types::CompletionItemKind::FUNCTION,
             SymbolKind::Const => lsp_types::CompletionItemKind::CONSTANT,
             SymbolKind::ConstParam => lsp_types::CompletionItemKind::TYPE_PARAMETER,
-            SymbolKind::Derive => lsp_types::CompletionItemKind::FUNCTION,
             SymbolKind::Enum => lsp_types::CompletionItemKind::ENUM,
             SymbolKind::Field => lsp_types::CompletionItemKind::FIELD,
             SymbolKind::Function => lsp_types::CompletionItemKind::FUNCTION,
@@ -121,7 +117,7 @@ pub(crate) fn completion_item_kind(
             SymbolKind::Label => lsp_types::CompletionItemKind::VARIABLE,
             SymbolKind::LifetimeParam => lsp_types::CompletionItemKind::TYPE_PARAMETER,
             SymbolKind::Local => lsp_types::CompletionItemKind::VARIABLE,
-            SymbolKind::Macro => lsp_types::CompletionItemKind::FUNCTION,
+            SymbolKind::Macro => lsp_types::CompletionItemKind::METHOD,
             SymbolKind::Module => lsp_types::CompletionItemKind::MODULE,
             SymbolKind::SelfParam => lsp_types::CompletionItemKind::VALUE,
             SymbolKind::Static => lsp_types::CompletionItemKind::VALUE,
@@ -472,8 +468,6 @@ fn semantic_token_type_and_modifiers(
     let mut mods = semantic_tokens::ModifierSet::default();
     let type_ = match highlight.tag {
         HlTag::Symbol(symbol) => match symbol {
-            SymbolKind::Attribute => semantic_tokens::ATTRIBUTE,
-            SymbolKind::Derive => semantic_tokens::DERIVE,
             SymbolKind::Module => lsp_types::SemanticTokenType::NAMESPACE,
             SymbolKind::Impl => semantic_tokens::TYPE_ALIAS,
             SymbolKind::Field => lsp_types::SemanticTokenType::PROPERTY,
@@ -510,7 +504,7 @@ fn semantic_token_type_and_modifiers(
             SymbolKind::BuiltinAttr => semantic_tokens::BUILTIN_ATTRIBUTE,
             SymbolKind::ToolModule => semantic_tokens::TOOL_MODULE,
         },
-        HlTag::AttributeBracket => semantic_tokens::ATTRIBUTE_BRACKET,
+        HlTag::Attribute => semantic_tokens::ATTRIBUTE,
         HlTag::BoolLiteral => semantic_tokens::BOOLEAN,
         HlTag::BuiltinType => semantic_tokens::BUILTIN_TYPE,
         HlTag::ByteLiteral | HlTag::NumericLiteral => lsp_types::SemanticTokenType::NUMBER,
diff --git a/crates/stdx/Cargo.toml b/crates/stdx/Cargo.toml
index 9bdf22188a..c456883a70 100644
--- a/crates/stdx/Cargo.toml
+++ b/crates/stdx/Cargo.toml
@@ -16,7 +16,7 @@ always-assert = { version = "0.1.2", features = ["log"] }
 # Think twice before adding anything here
 
 [target.'cfg(windows)'.dependencies]
-miow = "0.4.0"
+miow = "0.3.6"
 winapi = "0.3.9"
 
 [features]
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json
index e260062167..686844132c 100644
--- a/editors/code/package-lock.json
+++ b/editors/code/package-lock.json
@@ -9,7 +9,7 @@
             "version": "0.4.0-dev",
             "license": "MIT OR Apache-2.0",
             "dependencies": {
-                "d3": "^7.1.0",
+                "d3": "^7.2.0",
                 "d3-graphviz": "^4.0.0",
                 "https-proxy-agent": "^5.0.0",
                 "node-fetch": "^3.0.3",
@@ -792,9 +792,9 @@
             }
         },
         "node_modules/d3": {
-            "version": "7.1.1",
-            "resolved": "https://registry.npmjs.org/d3/-/d3-7.1.1.tgz",
-            "integrity": "sha512-8zkLMwSvUAnfN9pcJDfkuxU0Nvg4RLUD0A4BZN1KxJPtlnCGzMx3xM5cRl4m8fym/Vy8rlq52tl90UF3m91OnA==",
+            "version": "7.2.0",
+            "resolved": "https://registry.npmjs.org/d3/-/d3-7.2.0.tgz",
+            "integrity": "sha512-0bh5lPzD6R/I/SjkcgyQlMaIsrZDgh40yMkdJaiZ/58YEbh4zz5EvtjaudzmI6ruwQNvxGm00trYUyPa992NSQ==",
             "dependencies": {
                 "d3-array": "3",
                 "d3-axis": "3",
@@ -4503,9 +4503,9 @@
             "dev": true
         },
         "d3": {
-            "version": "7.1.1",
-            "resolved": "https://registry.npmjs.org/d3/-/d3-7.1.1.tgz",
-            "integrity": "sha512-8zkLMwSvUAnfN9pcJDfkuxU0Nvg4RLUD0A4BZN1KxJPtlnCGzMx3xM5cRl4m8fym/Vy8rlq52tl90UF3m91OnA==",
+            "version": "7.2.0",
+            "resolved": "https://registry.npmjs.org/d3/-/d3-7.2.0.tgz",
+            "integrity": "sha512-0bh5lPzD6R/I/SjkcgyQlMaIsrZDgh40yMkdJaiZ/58YEbh4zz5EvtjaudzmI6ruwQNvxGm00trYUyPa992NSQ==",
             "requires": {
                 "d3-array": "3",
                 "d3-axis": "3",
diff --git a/editors/code/package.json b/editors/code/package.json
index 26f21f73d4..21de43e96f 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -39,7 +39,7 @@
         "https-proxy-agent": "^5.0.0",
         "node-fetch": "^3.0.3",
         "vscode-languageclient": "8.0.0-next.2",
-        "d3": "^7.1.0",
+        "d3": "^7.2.0",
         "d3-graphviz": "^4.0.0"
     },
     "devDependencies": {
@@ -1125,11 +1125,6 @@
                 "id": "attribute",
                 "description": "Style for attributes"
             },
-            {
-                "id": "attributeBracket",
-                "description": "Style for attribute invocation brackets, that is the `#[` and `]` tokens",
-                "superType": "punctuation"
-            },
             {
                 "id": "bitwise",
                 "description": "Style for bitwise operators",
@@ -1184,11 +1179,6 @@
                 "id": "constParameter",
                 "description": "Style for const generics"
             },
-            {
-                "id": "derive",
-                "description": "Style for derives",
-                "superType": "attribute"
-            },
             {
                 "id": "dot",
                 "description": "Style for .",


Test patch:
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html b/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html
index 0b1c5470ee..1e778cc619 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlight_doctest.html
@@ -72,7 +72,7 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
     <span class="comment documentation">/// # Examples</span>
     <span class="comment documentation">///</span>
     <span class="comment documentation">/// ```</span>
-    <span class="comment documentation">/// #</span><span class="none injected"> </span><span class="attribute_bracket attribute injected">#</span><span class="attribute_bracket attribute injected">!</span><span class="attribute_bracket attribute injected">[</span><span class="builtin_attr attribute injected library">allow</span><span class="parenthesis attribute injected">(</span><span class="none attribute injected">unused_mut</span><span class="parenthesis attribute injected">)</span><span class="attribute_bracket attribute injected">]</span>
+    <span class="comment documentation">/// #</span><span class="none injected"> </span><span class="attribute attribute injected">#</span><span class="attribute attribute injected">!</span><span class="attribute attribute injected">[</span><span class="builtin_attr attribute injected library">allow</span><span class="parenthesis attribute injected">(</span><span class="none attribute injected">unused_mut</span><span class="parenthesis attribute injected">)</span><span class="attribute attribute injected">]</span>
     <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="none injected"> </span><span class="keyword injected">mut</span><span class="none injected"> </span><span class="variable declaration injected mutable">foo</span><span class="colon injected">:</span><span class="none injected"> </span><span class="struct injected">Foo</span><span class="none injected"> </span><span class="operator injected">=</span><span class="none injected"> </span><span class="struct injected">Foo</span><span class="operator injected">::</span><span class="function injected">new</span><span class="parenthesis injected">(</span><span class="parenthesis injected">)</span><span class="semicolon injected">;</span>
     <span class="comment documentation">/// ```</span>
     <span class="keyword">pub</span> <span class="keyword">const</span> <span class="keyword">fn</span> <span class="function associated declaration public static">new</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="operator">-&gt;</span> <span class="struct">Foo</span> <span class="brace">{</span>
@@ -143,12 +143,12 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
 <span class="comment documentation">///</span>
 <span class="comment documentation">/// ```</span>
 <span class="comment documentation">/// </span><span class="keyword control injected">loop</span><span class="none injected"> </span><span class="brace injected">{</span><span class="brace injected">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">not</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"false"</span><span class="parenthesis attribute">)</span><span class="comma attribute">,</span><span class="attribute_bracket attribute"> </span><span class="none attribute">doc</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"</span><span class="keyword control injected">loop</span><span class="none injected"> </span><span class="brace injected">{</span><span class="brace injected">}</span><span class="string_literal attribute">"</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">doc</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"</span><span class="keyword control injected">loop</span><span class="none injected"> </span><span class="brace injected">{</span><span class="brace injected">}</span><span class="string_literal attribute">"</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">not</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"false"</span><span class="parenthesis attribute">)</span><span class="comma attribute">,</span><span class="attribute attribute"> </span><span class="none attribute">doc</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"</span><span class="keyword control injected">loop</span><span class="none injected"> </span><span class="brace injected">{</span><span class="brace injected">}</span><span class="string_literal attribute">"</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">doc</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"</span><span class="keyword control injected">loop</span><span class="none injected"> </span><span class="brace injected">{</span><span class="brace injected">}</span><span class="string_literal attribute">"</span><span class="attribute attribute">]</span>
 <span class="comment documentation">/// ```</span>
 <span class="comment documentation">///</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"alloc"</span><span class="comma attribute">,</span><span class="attribute_bracket attribute"> </span><span class="none attribute">doc</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"```rust"</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">not</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"alloc"</span><span class="parenthesis attribute">)</span><span class="comma attribute">,</span><span class="attribute_bracket attribute"> </span><span class="none attribute">doc</span><span class="attribute_bracket attribute"> </span><span class="operator attribute">=</span><span class="attribute_bracket attribute"> </span><span class="string_literal attribute">"```ignore"</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"alloc"</span><span class="comma attribute">,</span><span class="attribute attribute"> </span><span class="none attribute">doc</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"```rust"</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">cfg_attr</span><span class="parenthesis attribute">(</span><span class="none attribute">not</span><span class="parenthesis attribute">(</span><span class="none attribute">feature</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"alloc"</span><span class="parenthesis attribute">)</span><span class="comma attribute">,</span><span class="attribute attribute"> </span><span class="none attribute">doc</span><span class="attribute attribute"> </span><span class="operator attribute">=</span><span class="attribute attribute"> </span><span class="string_literal attribute">"```ignore"</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
 <span class="comment documentation">/// </span><span class="keyword injected">let</span><span class="none injected"> </span><span class="punctuation injected">_</span><span class="none injected"> </span><span class="operator injected">=</span><span class="none injected"> </span><span class="function injected">example</span><span class="parenthesis injected">(</span><span class="operator injected">&</span><span class="none injected">alloc::</span><span class="macro injected">vec!</span><span class="bracket injected">[</span><span class="numeric_literal injected">1</span><span class="comma injected">,</span><span class="none injected"> </span><span class="numeric_literal injected">2</span><span class="comma injected">,</span><span class="none injected"> </span><span class="numeric_literal injected">3</span><span class="bracket injected">]</span><span class="parenthesis injected">)</span><span class="semicolon injected">;</span>
 <span class="comment documentation">/// ```</span>
 <span class="keyword">pub</span> <span class="keyword">fn</span> <span class="function declaration public">mix_and_match</span><span class="parenthesis">(</span><span class="parenthesis">)</span> <span class="brace">{</span><span class="brace">}</span>
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html b/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
index e457069e1f..b44fc817c7 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlight_strings.html
@@ -45,14 +45,14 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
         <span class="punctuation">$</span>crate<span class="colon">:</span><span class="colon">:</span>io<span class="colon">:</span><span class="colon">:</span>_print<span class="parenthesis">(</span><span class="punctuation">$</span>crate<span class="colon">:</span><span class="colon">:</span>format_args_nl<span class="punctuation">!</span><span class="parenthesis">(</span><span class="punctuation">$</span><span class="parenthesis">(</span><span class="punctuation">$</span>arg<span class="parenthesis">)</span><span class="punctuation">*</span><span class="parenthesis">)</span><span class="parenthesis">)</span><span class="semicolon">;</span>
     <span class="brace">}</span><span class="parenthesis">)</span>
 <span class="brace">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">format_args</span> <span class="brace">{</span><span class="brace">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">const_format_args</span> <span class="brace">{</span><span class="brace">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">format_args_nl</span> <span class="brace">{</span><span class="brace">}</span>
 
 <span class="keyword">mod</span> <span class="module declaration">panic</span> <span class="brace">{</span>
@@ -77,12 +77,12 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
     <span class="brace">}</span>
 <span class="brace">}</span>
 
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="parenthesis attribute">(</span><span class="none attribute">std_panic</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="parenthesis attribute">(</span><span class="none attribute">std_panic</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">macro_export</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">panic</span> <span class="brace">{</span><span class="brace">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">assert</span> <span class="brace">{</span><span class="brace">}</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">rustc_builtin_macro</span><span class="attribute attribute">]</span>
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">asm</span> <span class="brace">{</span><span class="brace">}</span>
 
 <span class="keyword">macro_rules</span><span class="punctuation">!</span> <span class="macro declaration">toho</span> <span class="brace">{</span>
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html b/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html
index 04494283d5..65dfbdf211 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html
@@ -54,7 +54,7 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
     <span class="keyword unsafe">unsafe</span> <span class="keyword">fn</span> <span class="function associated declaration reference unsafe">unsafe_method</span><span class="parenthesis">(</span><span class="operator">&</span><span class="self_keyword declaration reference">self</span><span class="parenthesis">)</span> <span class="brace">{</span><span class="brace">}</span>
 <span class="brace">}</span>
 
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">repr</span><span class="parenthesis attribute">(</span><span class="none attribute">packed</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">repr</span><span class="parenthesis attribute">(</span><span class="none attribute">packed</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
 <span class="keyword">struct</span> <span class="struct declaration">Packed</span> <span class="brace">{</span>
     <span class="field declaration">a</span><span class="colon">:</span> <span class="builtin_type">u16</span><span class="comma">,</span>
 <span class="brace">}</span>
diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html
index 5de621ce07..370f58080e 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html
@@ -43,16 +43,16 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
 <pre><code><span class="keyword">use</span> <span class="module">inner</span><span class="operator">::</span><span class="brace">{</span><span class="self_keyword">self</span> <span class="keyword">as</span> <span class="module declaration">inner_mod</span><span class="brace">}</span><span class="semicolon">;</span>
 <span class="keyword">mod</span> <span class="module declaration">inner</span> <span class="brace">{</span><span class="brace">}</span>
 
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">allow</span><span class="parenthesis attribute">(</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="module attribute crate_root library">proc_macros</span><span class="operator attribute">::</span><span class="attribute attribute library">identity</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">allow</span><span class="parenthesis attribute">(</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="module attribute crate_root library">proc_macros</span><span class="operator attribute">::</span><span class="macro attribute library">identity</span><span class="attribute attribute">]</span>
 <span class="keyword">pub</span> <span class="keyword">mod</span> <span class="module declaration public">ops</span> <span class="brace">{</span>
-    <span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn_once"</span><span class="attribute_bracket attribute">]</span>
+    <span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn_once"</span><span class="attribute attribute">]</span>
     <span class="keyword">pub</span> <span class="keyword">trait</span> <span class="trait declaration public">FnOnce</span><span class="angle">&lt;</span><span class="type_param declaration">Args</span><span class="angle">&gt;</span> <span class="brace">{</span><span class="brace">}</span>
 
-    <span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn_mut"</span><span class="attribute_bracket attribute">]</span>
+    <span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn_mut"</span><span class="attribute attribute">]</span>
     <span class="keyword">pub</span> <span class="keyword">trait</span> <span class="trait declaration public">FnMut</span><span class="angle">&lt;</span><span class="type_param declaration">Args</span><span class="angle">&gt;</span><span class="colon">:</span> <span class="trait public">FnOnce</span><span class="angle">&lt;</span><span class="type_param">Args</span><span class="angle">&gt;</span> <span class="brace">{</span><span class="brace">}</span>
 
-    <span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn"</span><span class="attribute_bracket attribute">]</span>
+    <span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="builtin_attr attribute library">lang</span> <span class="operator attribute">=</span> <span class="string_literal attribute">"fn"</span><span class="attribute attribute">]</span>
     <span class="keyword">pub</span> <span class="keyword">trait</span> <span class="trait declaration public">Fn</span><span class="angle">&lt;</span><span class="type_param declaration">Args</span><span class="angle">&gt;</span><span class="colon">:</span> <span class="trait public">FnMut</span><span class="angle">&lt;</span><span class="type_param">Args</span><span class="angle">&gt;</span> <span class="brace">{</span><span class="brace">}</span>
 <span class="brace">}</span>
 
@@ -87,8 +87,7 @@ proc_macros::<span class="macro">mirror!</span> <span class="brace">{</span>
     <span class="brace">}</span>
 <span class="brace">}</span>
 
-<span class="keyword">use</span> <span class="self_keyword crate_root">self</span><span class="operator">::</span><span class="struct">FooCopy</span><span class="operator">::</span><span class="brace">{</span><span class="self_keyword">self</span> <span class="keyword">as</span> <span class="struct declaration">BarCopy</span><span class="brace">}</span><span class="semicolon">;</span>
-<span class="attribute_bracket attribute">#</span><span class="attribute_bracket attribute">[</span><span class="attribute attribute default_library library">derive</span><span class="parenthesis attribute">(</span><span class="derive attribute default_library library">Copy</span><span class="parenthesis attribute">)</span><span class="attribute_bracket attribute">]</span>
+<span class="attribute attribute">#</span><span class="attribute attribute">[</span><span class="macro attribute default_library library">derive</span><span class="parenthesis attribute">(</span><span class="macro attribute default_library library">Copy</span><span class="parenthesis attribute">)</span><span class="attribute attribute">]</span>
 <span class="keyword">struct</span> <span class="struct declaration">FooCopy</span> <span class="brace">{</span>
     <span class="field declaration">x</span><span class="colon">:</span> <span class="builtin_type">u32</span><span class="comma">,</span>
 <span class="brace">}</span>
diff --git a/crates/ide/src/syntax_highlighting/tests.rs b/crates/ide/src/syntax_highlighting/tests.rs
index c5834e1942..63a1417c6a 100644
--- a/crates/ide/src/syntax_highlighting/tests.rs
+++ b/crates/ide/src/syntax_highlighting/tests.rs
@@ -60,7 +60,6 @@ impl Foo {
     }
 }
 
-use self::FooCopy::{self as BarCopy};
 #[derive(Copy)]
 struct FooCopy {
     x: u32,
diff --git a/crates/ide_completion/src/tests/attribute.rs b/crates/ide_completion/src/tests/attribute.rs
index 8141fab299..45979d4828 100644
--- a/crates/ide_completion/src/tests/attribute.rs
+++ b/crates/ide_completion/src/tests/attribute.rs
@@ -560,9 +560,9 @@ mod cfg {
         check(
             r#"#[cfg(target_endian = $0"#,
             expect![[r#"
-                ba little
-                ba big
-            "#]],
+            at little
+            at big
+"#]],
         );
     }
 }
@@ -594,13 +594,13 @@ mod derive {
 #[derive($0)] struct Test;
 "#,
             expect![[r#"
-                de Default
-                de Clone, Copy
-                de PartialEq
-                de PartialEq, Eq
-                de PartialEq, Eq, PartialOrd, Ord
-                de Clone
-                de PartialEq, PartialOrd
+                at Default
+                at Clone, Copy
+                at PartialEq
+                at PartialEq, Eq
+                at PartialEq, Eq, PartialOrd, Ord
+                at Clone
+                at PartialEq, PartialOrd
             "#]],
         );
     }
@@ -613,12 +613,12 @@ mod derive {
 #[derive(serde::Serialize, PartialEq, $0)] struct Test;
 "#,
             expect![[r#"
-                de Default
-                de Clone, Copy
-                de Eq
-                de Eq, PartialOrd, Ord
-                de Clone
-                de PartialOrd
+                at Default
+                at Clone, Copy
+                at Eq
+                at Eq, PartialOrd, Ord
+                at Clone
+                at PartialOrd
             "#]],
         )
     }
@@ -631,12 +631,12 @@ mod derive {
 #[derive($0 serde::Serialize, PartialEq)] struct Test;
 "#,
             expect![[r#"
-                de Default
-                de Clone, Copy
-                de Eq
-                de Eq, PartialOrd, Ord
-                de Clone
-                de PartialOrd
+                at Default
+                at Clone, Copy
+                at Eq
+                at Eq, PartialOrd, Ord
+                at Clone
+                at PartialOrd
             "#]],
         )
     }
@@ -649,7 +649,7 @@ mod derive {
 #[derive(der$0)] struct Test;
 "#,
             expect![[r#"
-                de DeriveIdentity (use proc_macros::DeriveIdentity)
+                at DeriveIdentity (use proc_macros::DeriveIdentity)
             "#]],
         );
         check_derive(
@@ -659,7 +659,7 @@ use proc_macros::DeriveIdentity;
 #[derive(der$0)] struct Test;
 "#,
             expect![[r#"
-                de DeriveIdentity
+                at DeriveIdentity
             "#]],
         );
     }
@@ -775,23 +775,23 @@ mod repr {
         check_repr(
             r#"#[repr($0)] struct Test;"#,
             expect![[r#"
-                ba align($0)
-                ba packed
-                ba transparent
-                ba C
-                ba u8
-                ba u16
-                ba u32
-                ba u64
-                ba u128
-                ba usize
-                ba i8
-                ba i16
-                ba i32
-                ba i64
-                ba i28
-                ba isize
-            "#]],
+            at align($0)
+            at packed
+            at transparent
+            at C
+            at u8
+            at u16
+            at u32
+            at u64
+            at u128
+            at usize
+            at i8
+            at i16
+            at i32
+            at i64
+            at i28
+            at isize
+        "#]],
         );
     }
 
@@ -805,21 +805,21 @@ mod repr {
         check_repr(
             r#"#[repr(align(1), $0)] struct Test;"#,
             expect![[r#"
-                ba transparent
-                ba C
-                ba u8
-                ba u16
-                ba u32
-                ba u64
-                ba u128
-                ba usize
-                ba i8
-                ba i16
-                ba i32
-                ba i64
-                ba i28
-                ba isize
-            "#]],
+            at transparent
+            at C
+            at u8
+            at u16
+            at u32
+            at u64
+            at u128
+            at usize
+            at i8
+            at i16
+            at i32
+            at i64
+            at i28
+            at isize
+        "#]],
         );
     }
 
@@ -828,21 +828,21 @@ mod repr {
         check_repr(
             r#"#[repr(packed, $0)] struct Test;"#,
             expect![[r#"
-                ba transparent
-                ba C
-                ba u8
-                ba u16
-                ba u32
-                ba u64
-                ba u128
-                ba usize
-                ba i8
-                ba i16
-                ba i32
-                ba i64
-                ba i28
-                ba isize
-            "#]],
+            at transparent
+            at C
+            at u8
+            at u16
+            at u32
+            at u64
+            at u128
+            at usize
+            at i8
+            at i16
+            at i32
+            at i64
+            at i28
+            at isize
+        "#]],
         );
     }
 
@@ -851,21 +851,21 @@ mod repr {
         check_repr(
             r#"#[repr(C, $0)] struct Test;"#,
             expect![[r#"
-                ba align($0)
-                ba packed
-                ba u8
-                ba u16
-                ba u32
-                ba u64
-                ba u128
-                ba usize
-                ba i8
-                ba i16
-                ba i32
-                ba i64
-                ba i28
-                ba isize
-            "#]],
+            at align($0)
+            at packed
+            at u8
+            at u16
+            at u32
+            at u64
+            at u128
+            at usize
+            at i8
+            at i16
+            at i32
+            at i64
+            at i28
+            at isize
+        "#]],
         );
     }
 
@@ -874,10 +874,10 @@ mod repr {
         check_repr(
             r#"#[repr(usize, $0)] struct Test;"#,
             expect![[r#"
-                ba align($0)
-                ba packed
-                ba C
-            "#]],
+            at align($0)
+            at packed
+            at C
+        "#]],
         );
     }
 }
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt b/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
index 4610984acb..fd04163de9 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/clippy_pass_by_ref.txt
@@ -114,7 +114,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -205,7 +205,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -296,69 +296,55 @@
             tags: None,
             data: None,
         },
-        fix: Some(
-            Fix {
-                ranges: [
-                    Range {
-                        start: Position {
-                            line: 41,
-                            character: 23,
-                        },
-                        end: Position {
-                            line: 41,
-                            character: 28,
-                        },
-                    },
-                ],
-                action: CodeAction {
-                    title: "consider passing by value instead: `self`",
-                    group: None,
-                    kind: Some(
-                        CodeActionKind(
-                            "quickfix",
-                        ),
+        fixes: [
+            CodeAction {
+                title: "consider passing by value instead: `self`",
+                group: None,
+                kind: Some(
+                    CodeActionKind(
+                        "quickfix",
                     ),
-                    edit: Some(
-                        SnippetWorkspaceEdit {
-                            changes: Some(
-                                {
-                                    Url {
-                                        scheme: "file",
-                                        cannot_be_a_base: false,
-                                        username: "",
-                                        password: None,
-                                        host: None,
-                                        port: None,
-                                        path: "/test/compiler/mir/tagset.rs",
-                                        query: None,
-                                        fragment: None,
-                                    }: [
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 41,
-                                                    character: 23,
-                                                },
-                                                end: Position {
-                                                    line: 41,
-                                                    character: 28,
-                                                },
+                ),
+                edit: Some(
+                    SnippetWorkspaceEdit {
+                        changes: Some(
+                            {
+                                Url {
+                                    scheme: "file",
+                                    cannot_be_a_base: false,
+                                    username: "",
+                                    password: None,
+                                    host: None,
+                                    port: None,
+                                    path: "/test/compiler/mir/tagset.rs",
+                                    query: None,
+                                    fragment: None,
+                                }: [
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 41,
+                                                character: 23,
+                                            },
+                                            end: Position {
+                                                line: 41,
+                                                character: 28,
                                             },
-                                            new_text: "self",
                                         },
-                                    ],
-                                },
-                            ),
-                            document_changes: None,
-                            change_annotations: None,
-                        },
-                    ),
-                    is_preferred: Some(
-                        true,
-                    ),
-                    data: None,
-                },
+                                        new_text: "self",
+                                    },
+                                ],
+                            },
+                        ),
+                        document_changes: None,
+                        change_annotations: None,
+                    },
+                ),
+                is_preferred: Some(
+                    true,
+                ),
+                data: None,
             },
-        ),
+        ],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
index 989e5cf66d..a7f936a703 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt b/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
index fe5cf9b3be..8bee4cfe10 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/macro_compiler_error.txt
@@ -64,7 +64,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -131,7 +131,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -224,6 +224,6 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
index dc36aa761c..afc562a0e2 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_incompatible_type_for_trait.txt
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
index d557196c2b..05074a914b 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_mismatched_type.txt
@@ -59,6 +59,6 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
index 46d44192c5..3ded70411d 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable.txt
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -143,69 +143,55 @@
             tags: None,
             data: None,
         },
-        fix: Some(
-            Fix {
-                ranges: [
-                    Range {
-                        start: Position {
-                            line: 290,
-                            character: 8,
-                        },
-                        end: Position {
-                            line: 290,
-                            character: 11,
-                        },
-                    },
-                ],
-                action: CodeAction {
-                    title: "consider prefixing with an underscore: `_foo`",
-                    group: None,
-                    kind: Some(
-                        CodeActionKind(
-                            "quickfix",
-                        ),
+        fixes: [
+            CodeAction {
+                title: "consider prefixing with an underscore: `_foo`",
+                group: None,
+                kind: Some(
+                    CodeActionKind(
+                        "quickfix",
                     ),
-                    edit: Some(
-                        SnippetWorkspaceEdit {
-                            changes: Some(
-                                {
-                                    Url {
-                                        scheme: "file",
-                                        cannot_be_a_base: false,
-                                        username: "",
-                                        password: None,
-                                        host: None,
-                                        port: None,
-                                        path: "/test/driver/subcommand/repl.rs",
-                                        query: None,
-                                        fragment: None,
-                                    }: [
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 290,
-                                                    character: 8,
-                                                },
-                                                end: Position {
-                                                    line: 290,
-                                                    character: 11,
-                                                },
+                ),
+                edit: Some(
+                    SnippetWorkspaceEdit {
+                        changes: Some(
+                            {
+                                Url {
+                                    scheme: "file",
+                                    cannot_be_a_base: false,
+                                    username: "",
+                                    password: None,
+                                    host: None,
+                                    port: None,
+                                    path: "/test/driver/subcommand/repl.rs",
+                                    query: None,
+                                    fragment: None,
+                                }: [
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 290,
+                                                character: 8,
+                                            },
+                                            end: Position {
+                                                line: 290,
+                                                character: 11,
                                             },
-                                            new_text: "_foo",
                                         },
-                                    ],
-                                },
-                            ),
-                            document_changes: None,
-                            change_annotations: None,
-                        },
-                    ),
-                    is_preferred: Some(
-                        true,
-                    ),
-                    data: None,
-                },
+                                        new_text: "_foo",
+                                    },
+                                ],
+                            },
+                        ),
+                        document_changes: None,
+                        change_annotations: None,
+                    },
+                ),
+                is_preferred: Some(
+                    true,
+                ),
+                data: None,
             },
-        ),
+        ],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
index b595487e8f..0993aa1af1 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_hint.txt
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -143,69 +143,55 @@
             tags: None,
             data: None,
         },
-        fix: Some(
-            Fix {
-                ranges: [
-                    Range {
-                        start: Position {
-                            line: 290,
-                            character: 8,
-                        },
-                        end: Position {
-                            line: 290,
-                            character: 11,
-                        },
-                    },
-                ],
-                action: CodeAction {
-                    title: "consider prefixing with an underscore: `_foo`",
-                    group: None,
-                    kind: Some(
-                        CodeActionKind(
-                            "quickfix",
-                        ),
+        fixes: [
+            CodeAction {
+                title: "consider prefixing with an underscore: `_foo`",
+                group: None,
+                kind: Some(
+                    CodeActionKind(
+                        "quickfix",
                     ),
-                    edit: Some(
-                        SnippetWorkspaceEdit {
-                            changes: Some(
-                                {
-                                    Url {
-                                        scheme: "file",
-                                        cannot_be_a_base: false,
-                                        username: "",
-                                        password: None,
-                                        host: None,
-                                        port: None,
-                                        path: "/test/driver/subcommand/repl.rs",
-                                        query: None,
-                                        fragment: None,
-                                    }: [
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 290,
-                                                    character: 8,
-                                                },
-                                                end: Position {
-                                                    line: 290,
-                                                    character: 11,
-                                                },
+                ),
+                edit: Some(
+                    SnippetWorkspaceEdit {
+                        changes: Some(
+                            {
+                                Url {
+                                    scheme: "file",
+                                    cannot_be_a_base: false,
+                                    username: "",
+                                    password: None,
+                                    host: None,
+                                    port: None,
+                                    path: "/test/driver/subcommand/repl.rs",
+                                    query: None,
+                                    fragment: None,
+                                }: [
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 290,
+                                                character: 8,
+                                            },
+                                            end: Position {
+                                                line: 290,
+                                                character: 11,
                                             },
-                                            new_text: "_foo",
                                         },
-                                    ],
-                                },
-                            ),
-                            document_changes: None,
-                            change_annotations: None,
-                        },
-                    ),
-                    is_preferred: Some(
-                        true,
-                    ),
-                    data: None,
-                },
+                                        new_text: "_foo",
+                                    },
+                                ],
+                            },
+                        ),
+                        document_changes: None,
+                        change_annotations: None,
+                    },
+                ),
+                is_preferred: Some(
+                    true,
+                ),
+                data: None,
             },
-        ),
+        ],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
index 3ee50392a7..d7a974ae57 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
@@ -72,7 +72,7 @@
             ),
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -143,69 +143,55 @@
             tags: None,
             data: None,
         },
-        fix: Some(
-            Fix {
-                ranges: [
-                    Range {
-                        start: Position {
-                            line: 290,
-                            character: 8,
-                        },
-                        end: Position {
-                            line: 290,
-                            character: 11,
-                        },
-                    },
-                ],
-                action: CodeAction {
-                    title: "consider prefixing with an underscore: `_foo`",
-                    group: None,
-                    kind: Some(
-                        CodeActionKind(
-                            "quickfix",
-                        ),
+        fixes: [
+            CodeAction {
+                title: "consider prefixing with an underscore: `_foo`",
+                group: None,
+                kind: Some(
+                    CodeActionKind(
+                        "quickfix",
                     ),
-                    edit: Some(
-                        SnippetWorkspaceEdit {
-                            changes: Some(
-                                {
-                                    Url {
-                                        scheme: "file",
-                                        cannot_be_a_base: false,
-                                        username: "",
-                                        password: None,
-                                        host: None,
-                                        port: None,
-                                        path: "/test/driver/subcommand/repl.rs",
-                                        query: None,
-                                        fragment: None,
-                                    }: [
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 290,
-                                                    character: 8,
-                                                },
-                                                end: Position {
-                                                    line: 290,
-                                                    character: 11,
-                                                },
+                ),
+                edit: Some(
+                    SnippetWorkspaceEdit {
+                        changes: Some(
+                            {
+                                Url {
+                                    scheme: "file",
+                                    cannot_be_a_base: false,
+                                    username: "",
+                                    password: None,
+                                    host: None,
+                                    port: None,
+                                    path: "/test/driver/subcommand/repl.rs",
+                                    query: None,
+                                    fragment: None,
+                                }: [
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 290,
+                                                character: 8,
+                                            },
+                                            end: Position {
+                                                line: 290,
+                                                character: 11,
                                             },
-                                            new_text: "_foo",
                                         },
-                                    ],
-                                },
-                            ),
-                            document_changes: None,
-                            change_annotations: None,
-                        },
-                    ),
-                    is_preferred: Some(
-                        true,
-                    ),
-                    data: None,
-                },
+                                        new_text: "_foo",
+                                    },
+                                ],
+                            },
+                        ),
+                        document_changes: None,
+                        change_annotations: None,
+                    },
+                ),
+                is_preferred: Some(
+                    true,
+                ),
+                data: None,
             },
-        ),
+        ],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt b/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
index 8ec92888ce..5ea27a1527 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/rustc_wrong_number_of_parameters.txt
@@ -88,7 +88,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -179,6 +179,6 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
 ]
diff --git a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
index d7987f65ed..f77abde515 100644
--- a/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
+++ b/crates/rust-analyzer/src/diagnostics/test_data/snap_multi_line_fix.txt
@@ -114,7 +114,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -205,7 +205,7 @@
             tags: None,
             data: None,
         },
-        fix: None,
+        fixes: [],
     },
     MappedRustDiagnostic {
         url: Url {
@@ -296,92 +296,68 @@
             tags: None,
             data: None,
         },
-        fix: Some(
-            Fix {
-                ranges: [
-                    Range {
-                        start: Position {
-                            line: 2,
-                            character: 4,
-                        },
-                        end: Position {
-                            line: 2,
-                            character: 30,
-                        },
-                    },
-                    Range {
-                        start: Position {
-                            line: 3,
-                            character: 4,
-                        },
-                        end: Position {
-                            line: 3,
-                            character: 5,
-                        },
-                    },
-                ],
-                action: CodeAction {
-                    title: "return the expression directly: `(0..10).collect()`",
-                    group: None,
-                    kind: Some(
-                        CodeActionKind(
-                            "quickfix",
-                        ),
+        fixes: [
+            CodeAction {
+                title: "return the expression directly: `(0..10).collect()`",
+                group: None,
+                kind: Some(
+                    CodeActionKind(
+                        "quickfix",
                     ),
-                    edit: Some(
-                        SnippetWorkspaceEdit {
-                            changes: Some(
-                                {
-                                    Url {
-                                        scheme: "file",
-                                        cannot_be_a_base: false,
-                                        username: "",
-                                        password: None,
-                                        host: None,
-                                        port: None,
-                                        path: "/test/src/main.rs",
-                                        query: None,
-                                        fragment: None,
-                                    }: [
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 2,
-                                                    character: 4,
-                                                },
-                                                end: Position {
-                                                    line: 2,
-                                                    character: 30,
-                                                },
+                ),
+                edit: Some(
+                    SnippetWorkspaceEdit {
+                        changes: Some(
+                            {
+                                Url {
+                                    scheme: "file",
+                                    cannot_be_a_base: false,
+                                    username: "",
+                                    password: None,
+                                    host: None,
+                                    port: None,
+                                    path: "/test/src/main.rs",
+                                    query: None,
+                                    fragment: None,
+                                }: [
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 2,
+                                                character: 4,
+                                            },
+                                            end: Position {
+                                                line: 2,
+                                                character: 30,
                                             },
-                                            new_text: "",
                                         },
-                                        TextEdit {
-                                            range: Range {
-                                                start: Position {
-                                                    line: 3,
-                                                    character: 4,
-                                                },
-                                                end: Position {
-                                                    line: 3,
-                                                    character: 5,
-                                                },
+                                        new_text: "",
+                                    },
+                                    TextEdit {
+                                        range: Range {
+                                            start: Position {
+                                                line: 3,
+                                                character: 4,
+                                            },
+                                            end: Position {
+                                                line: 3,
+                                                character: 5,
                                             },
-                                            new_text: "(0..10).collect()",
                                         },
-                                    ],
-                                },
-                            ),
-                            document_changes: None,
-                            change_annotations: None,
-                        },
-                    ),
-                    is_preferred: Some(
-                        true,
-                    ),
-                    data: None,
-                },
+                                        new_text: "(0..10).collect()",
+                                    },
+                                ],
+                            },
+                        ),
+                        document_changes: None,
+                        change_annotations: None,
+                    },
+                ),
+                is_preferred: Some(
+                    true,
+                ),
+                data: None,
             },
-        ),
+        ],
     },
 ]
diff --git a/crates/rust-analyzer/tests/slow-tests/tidy.rs b/crates/rust-analyzer/tests/slow-tests/tidy.rs
index b8713123fb..5debb9fb3d 100644
--- a/crates/rust-analyzer/tests/slow-tests/tidy.rs
+++ b/crates/rust-analyzer/tests/slow-tests/tidy.rs
@@ -229,6 +229,7 @@ MIT OR Apache-2.0
 MIT OR Apache-2.0 OR Zlib
 MIT OR Zlib OR Apache-2.0
 MIT/Apache-2.0
+Unlicense OR MIT
 Unlicense/MIT
 Zlib OR Apache-2.0 OR MIT
 "