about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2022-11-07 12:53:33 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2022-11-07 12:54:12 +0200
commitcff7ab1308906dc45f11967be65ac752f0ea2994 (patch)
tree448ab530dba0843b2d27dad6979d9f9e2a14419e
parentf54c31391408214a890bada228fd3b2eb932b8a7 (diff)
downloadrust-cff7ab1308906dc45f11967be65ac752f0ea2994.tar.gz
rust-cff7ab1308906dc45f11967be65ac752f0ea2994.zip
Fix typos
-rw-r--r--crates/flycheck/src/lib.rs2
-rw-r--r--crates/hir-expand/src/lib.rs4
-rw-r--r--crates/rust-analyzer/src/config.rs2
-rw-r--r--crates/rust-analyzer/src/line_index.rs2
-rw-r--r--crates/syntax/src/tests/sourcegen_ast.rs2
-rw-r--r--docs/user/generated_config.adoc2
-rw-r--r--editors/code/package.json2
7 files changed, 8 insertions, 8 deletions
diff --git a/crates/flycheck/src/lib.rs b/crates/flycheck/src/lib.rs
index 1758c9c27a2..ff507a52d55 100644
--- a/crates/flycheck/src/lib.rs
+++ b/crates/flycheck/src/lib.rs
@@ -365,7 +365,7 @@ struct JodChild(GroupChild);
 /// A handle to a cargo process used for fly-checking.
 struct CargoHandle {
     /// The handle to the actual cargo process. As we cannot cancel directly from with
-    /// a read syscall dropping and therefor terminating the process is our best option.
+    /// a read syscall dropping and therefore terminating the process is our best option.
     child: JodChild,
     thread: jod_thread::JoinHandle<io::Result<(bool, String)>>,
     receiver: Receiver<CargoMessage>,
diff --git a/crates/hir-expand/src/lib.rs b/crates/hir-expand/src/lib.rs
index a5b499fe8d9..7352b003a49 100644
--- a/crates/hir-expand/src/lib.rs
+++ b/crates/hir-expand/src/lib.rs
@@ -814,7 +814,7 @@ impl<'a> InFile<&'a SyntaxNode> {
 
     pub fn original_syntax_node(self, db: &dyn db::AstDatabase) -> Option<InFile<SyntaxNode>> {
         // This kind of upmapping can only be achieved in attribute expanded files,
-        // as we don't have node inputs otherwise and  therefor can't find an `N` node in the input
+        // as we don't have node inputs otherwise and therefore can't find an `N` node in the input
         if !self.file_id.is_macro() {
             return Some(self.map(Clone::clone));
         } else if !self.file_id.is_attr_macro(db) {
@@ -926,7 +926,7 @@ impl<N: AstNode> InFile<N> {
 
     pub fn original_ast_node(self, db: &dyn db::AstDatabase) -> Option<InFile<N>> {
         // This kind of upmapping can only be achieved in attribute expanded files,
-        // as we don't have node inputs otherwise and  therefor can't find an `N` node in the input
+        // as we don't have node inputs otherwise and therefore can't find an `N` node in the input
         if !self.file_id.is_macro() {
             return Some(self);
         } else if !self.file_id.is_attr_macro(db) {
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 4072ae585db..c278ba2d7c5 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -157,7 +157,7 @@ config_data! {
         checkOnSave_noDefaultFeatures: Option<bool>      = "null",
         /// Override the command rust-analyzer uses instead of `cargo check` for
         /// diagnostics on save. The command is required to output json and
-        /// should therefor include `--message-format=json` or a similar option.
+        /// should therefore include `--message-format=json` or a similar option.
         ///
         /// If you're changing this because you're using some tool wrapping
         /// Cargo, you might also want to change
diff --git a/crates/rust-analyzer/src/line_index.rs b/crates/rust-analyzer/src/line_index.rs
index 7636c3da7f9..2945dba12f2 100644
--- a/crates/rust-analyzer/src/line_index.rs
+++ b/crates/rust-analyzer/src/line_index.rs
@@ -42,7 +42,7 @@ impl LineEndings {
         loop {
             let idx = match find_crlf(&tail[gap_len..]) {
                 None if crlf_seen => tail.len(),
-                // SAFETY: buf is unchanged and therefor still contains utf8 data
+                // SAFETY: buf is unchanged and therefore still contains utf8 data
                 None => return (unsafe { String::from_utf8_unchecked(buf) }, LineEndings::Unix),
                 Some(idx) => {
                     crlf_seen = true;
diff --git a/crates/syntax/src/tests/sourcegen_ast.rs b/crates/syntax/src/tests/sourcegen_ast.rs
index 70b54843dba..712ef5f63b6 100644
--- a/crates/syntax/src/tests/sourcegen_ast.rs
+++ b/crates/syntax/src/tests/sourcegen_ast.rs
@@ -86,7 +86,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> String {
                 .traits
                 .iter()
                 .filter(|trait_name| {
-                    // Loops have two expressions so this might collide, therefor manual impl it
+                    // Loops have two expressions so this might collide, therefore manual impl it
                     node.name != "ForExpr" && node.name != "WhileExpr"
                         || trait_name.as_str() != "HasLoopBody"
                 })
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 36794efe427..f171eb41bfd 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -173,7 +173,7 @@ Whether to pass `--no-default-features` to Cargo. Defaults to
 --
 Override the command rust-analyzer uses instead of `cargo check` for
 diagnostics on save. The command is required to output json and
-should therefor include `--message-format=json` or a similar option.
+should therefore include `--message-format=json` or a similar option.
 
 If you're changing this because you're using some tool wrapping
 Cargo, you might also want to change
diff --git a/editors/code/package.json b/editors/code/package.json
index 1a97a9c0893..4357dc73067 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -623,7 +623,7 @@
                     ]
                 },
                 "rust-analyzer.checkOnSave.overrideCommand": {
-                    "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefor include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects, this command is invoked for\neach of them, with the working directory being the project root\n(i.e., the folder containing the `Cargo.toml`).\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
+                    "markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects, this command is invoked for\neach of them, with the working directory being the project root\n(i.e., the folder containing the `Cargo.toml`).\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
                     "default": null,
                     "type": [
                         "null",