Unnamed repository; edit this file 'description' to name the repository.
chore: fix some comments
Signed-off-by: cuishuang <[email protected]>
cuishuang 2024-09-02
parent 779d9ee · commit 680de15
-rw-r--r--crates/hir/src/semantics/source_to_def.rs2
-rw-r--r--crates/intern/src/symbol/symbols.rs2
-rw-r--r--crates/rust-analyzer/src/cli/scip.rs2
-rw-r--r--crates/span/src/hygiene.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/semantics/source_to_def.rs b/crates/hir/src/semantics/source_to_def.rs
index 09df639d4a..edeb19030a 100644
--- a/crates/hir/src/semantics/source_to_def.rs
+++ b/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/crates/intern/src/symbol/symbols.rs b/crates/intern/src/symbol/symbols.rs
index f48daba54e..60070b8850 100644
--- a/crates/intern/src/symbol/symbols.rs
+++ b/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/crates/rust-analyzer/src/cli/scip.rs b/crates/rust-analyzer/src/cli/scip.rs
index b92713129d..e9198977de 100644
--- a/crates/rust-analyzer/src/cli/scip.rs
+++ b/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/crates/span/src/hygiene.rs b/crates/span/src/hygiene.rs
index 874480c59f..cb9c092f5f 100644
--- a/crates/span/src/hygiene.rs
+++ b/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,