about summary refs log tree commit diff
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2024-09-02 18:21:19 +0800
committercuishuang <imcusg@gmail.com>2024-09-02 18:33:23 +0800
commitddb1e41e5034ccc519873c93e7f0efd8b85e6b90 (patch)
tree0212446f27a7bceaa2708deb1bd0c036cc5b6d30
parentc7f4874be017a7766fa7bccb5d421e4312ef3a82 (diff)
downloadrust-ddb1e41e5034ccc519873c93e7f0efd8b85e6b90.tar.gz
rust-ddb1e41e5034ccc519873c93e7f0efd8b85e6b90.zip
chore: fix some comments
Signed-off-by: cuishuang <imcusg@gmail.com>
-rw-r--r--src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs2
-rw-r--r--src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs2
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs2
-rw-r--r--src/tools/rust-analyzer/crates/span/src/hygiene.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs b/src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs
index 09df639d4a8..edeb19030ac 100644
--- a/src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs
+++ b/src/tools/rust-analyzer/crates/hir/src/semantics/source_to_def.rs
@@ -281,7 +281,7 @@ impl SourceToDefCtx<'_, '_> {
         let (body, source_map) = self.db.body_with_source_map(container);
         let src = src.cloned().map(ast::Pat::from);
         let pat_id = source_map.node_pat(src.as_ref())?;
-        // the pattern could resolve to a constant, verify that that is not the case
+        // the pattern could resolve to a constant, verify that this is not the case
         if let crate::Pat::Bind { id, .. } = body[pat_id] {
             Some((container, id))
         } else {
diff --git a/src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs b/src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs
index f48daba54e7..60070b8850f 100644
--- a/src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs
+++ b/src/tools/rust-analyzer/crates/intern/src/symbol/symbols.rs
@@ -15,7 +15,7 @@ macro_rules! define_symbols {
     (@WITH_NAME: $($alias:ident = $value:literal,)* @PLAIN: $($name:ident,)*) => {
         // Ideally we would be emitting `const` here, but then we no longer have stable addresses
         // which is what we are relying on for equality! In the future if consts can refer to
-        // statics we should swap these for `const`s and have the the string literal being pointed
+        // statics we should swap these for `const`s and have the string literal being pointed
         // to be statics to refer to such that their address is stable.
         $(
             pub static $name: Symbol = Symbol { repr: TaggedArcPtr::non_arc(&stringify!($name)) };
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
index b92713129df..e9198977dea 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
@@ -142,7 +142,7 @@ impl flags::Scip {
                 let mut symbol_roles = Default::default();
 
                 if let Some(def) = token.definition {
-                    // if the the range of the def and the range of the token are the same, this must be the definition.
+                    // if the range of the def and the range of the token are the same, this must be the definition.
                     // they also must be in the same file. See https://github.com/rust-lang/rust-analyzer/pull/17988
                     if def.file_id == file_id && def.range == text_range {
                         symbol_roles |= scip_types::SymbolRole::Definition as i32;
diff --git a/src/tools/rust-analyzer/crates/span/src/hygiene.rs b/src/tools/rust-analyzer/crates/span/src/hygiene.rs
index 874480c59fb..cb9c092f5fc 100644
--- a/src/tools/rust-analyzer/crates/span/src/hygiene.rs
+++ b/src/tools/rust-analyzer/crates/span/src/hygiene.rs
@@ -81,7 +81,7 @@ pub struct SyntaxContextData {
     /// Invariant: Only [`SyntaxContextId::ROOT`] has a [`None`] outer expansion.
     // FIXME: The None case needs to encode the context crate id. We can encode that as the MSB of
     // MacroCallId is reserved anyways so we can do bit tagging here just fine.
-    // The bigger issue is that that will cause interning to now create completely separate chains
+    // The bigger issue is that this will cause interning to now create completely separate chains
     // per crate. Though that is likely not a problem as `MacroCallId`s are already crate calling dependent.
     pub outer_expn: Option<MacroCallId>,
     pub outer_transparency: Transparency,