about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2025-02-25 05:00:49 +0200
committerChayim Refael Friedman <chayimfr@gmail.com>2025-02-25 05:02:17 +0200
commit5c654dcb46f436a135c06aae736ec8792c4364c8 (patch)
treecf000a44df9896df3d426f6c71b3226e0ec8ebd4
parentd5a85af7c0a990dd05cb210fbfd0ca956e3a2000 (diff)
downloadrust-5c654dcb46f436a135c06aae736ec8792c4364c8.tar.gz
rust-5c654dcb46f436a135c06aae736ec8792c4364c8.zip
Disable typos checker for the target feature names
-rw-r--r--src/tools/rust-analyzer/.typos.toml2
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/target_feature.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/.typos.toml b/src/tools/rust-analyzer/.typos.toml
index 0f2f9b1b275..e938bddd4b1 100644
--- a/src/tools/rust-analyzer/.typos.toml
+++ b/src/tools/rust-analyzer/.typos.toml
@@ -18,6 +18,8 @@ extend-ignore-re = [
     "INOUT",
     "optin",
     "=Pn",
+    # ignore `// spellchecker:off` until `// spellchecker:on`
+    "(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
 ]
 
 [default.extend-words]
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/target_feature.rs b/src/tools/rust-analyzer/crates/hir-ty/src/target_feature.rs
index 17a1b8efee3..fe9416c6cfc 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/target_feature.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/target_feature.rs
@@ -77,6 +77,7 @@ static TARGET_FEATURE_IMPLICATIONS: LazyLock<FxHashMap<Symbol, Box<[Symbol]>>> =
         result
     });
 
+// spellchecker:off
 const TARGET_FEATURE_IMPLICATIONS_RAW: &[(&str, &[&str])] = &[
     // Arm
     ("aes", &["neon"]),
@@ -257,3 +258,4 @@ const TARGET_FEATURE_IMPLICATIONS_RAW: &[(&str, &[&str])] = &[
     ("isa-68060", &["isa-68040"]),
     ("isa-68882", &["isa-68881"]),
 ];
+// spellchecker:on