about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoung-Flash <dongyang@apache.org>2024-02-19 18:12:08 +0800
committerYoung-Flash <dongyang@apache.org>2024-02-19 18:12:08 +0800
commitf3d84e86c8e5490e2ac96c0fcd0de179d9f4aa22 (patch)
treecf6a1a3d568c379255d0974264fdf330df79a2b6
parentaf174b9428fd4a80971b7bfc213f108facf62740 (diff)
downloadrust-f3d84e86c8e5490e2ac96c0fcd0de179d9f4aa22.tar.gz
rust-f3d84e86c8e5490e2ac96c0fcd0de179d9f4aa22.zip
minor: fix typo
-rw-r--r--crates/hir/src/term_search/tactics.rs6
-rw-r--r--crates/ide-completion/src/item.rs2
-rw-r--r--crates/rust-analyzer/tests/slow-tests/support.rs2
-rw-r--r--crates/salsa/src/lib.rs4
-rw-r--r--crates/salsa/src/lru.rs2
5 files changed, 8 insertions, 8 deletions
diff --git a/crates/hir/src/term_search/tactics.rs b/crates/hir/src/term_search/tactics.rs
index 666d63ac155..edbf75affe6 100644
--- a/crates/hir/src/term_search/tactics.rs
+++ b/crates/hir/src/term_search/tactics.rs
@@ -281,14 +281,14 @@ pub(super) fn type_constructor<'a, DB: HirDatabase>(
                         if ctx.config.enable_borrowcheck && struct_ty.contains_reference(db) {
                             return None;
                         }
-                        let fileds = it.fields(db);
+                        let fields = it.fields(db);
                         // Check if all fields are visible, otherwise we cannot fill them
-                        if fileds.iter().any(|it| !it.is_visible_from(db, module)) {
+                        if fields.iter().any(|it| !it.is_visible_from(db, module)) {
                             return None;
                         }
 
                         // Early exit if some param cannot be filled from lookup
-                        let param_exprs: Vec<Vec<Expr>> = fileds
+                        let param_exprs: Vec<Vec<Expr>> = fields
                             .into_iter()
                             .map(|field| lookup.find(db, &field.ty(db)))
                             .collect::<Option<_>>()?;
diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs
index c2c0641961a..4bab2886851 100644
--- a/crates/ide-completion/src/item.rs
+++ b/crates/ide-completion/src/item.rs
@@ -308,7 +308,7 @@ impl CompletionRelevance {
 
                 // When a fn is bumped due to return type:
                 // Bump Constructor or Builder methods with no arguments,
-                // over them tha with self arguments
+                // over them than with self arguments
                 if fn_score > 0 {
                     if !asf.has_params {
                         // bump associated functions
diff --git a/crates/rust-analyzer/tests/slow-tests/support.rs b/crates/rust-analyzer/tests/slow-tests/support.rs
index 392a7170207..dfd25abc70f 100644
--- a/crates/rust-analyzer/tests/slow-tests/support.rs
+++ b/crates/rust-analyzer/tests/slow-tests/support.rs
@@ -243,7 +243,7 @@ impl Server {
                             to_string_pretty(actual_part).unwrap(),
                         );
                 } else {
-                    tracing::debug!("sucessfully matched notification");
+                    tracing::debug!("successfully matched notification");
                     return;
                 }
             } else {
diff --git a/crates/salsa/src/lib.rs b/crates/salsa/src/lib.rs
index 668dcfd925d..48b5d633bd6 100644
--- a/crates/salsa/src/lib.rs
+++ b/crates/salsa/src/lib.rs
@@ -456,12 +456,12 @@ pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
     /// Name of the query method (e.g., `foo`)
     const QUERY_NAME: &'static str;
 
-    /// Extact storage for this query from the storage for its group.
+    /// Extract storage for this query from the storage for its group.
     fn query_storage<'a>(
         group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
     ) -> &'a std::sync::Arc<Self::Storage>;
 
-    /// Extact storage for this query from the storage for its group.
+    /// Extract storage for this query from the storage for its group.
     fn query_storage_mut<'a>(
         group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
     ) -> &'a std::sync::Arc<Self::Storage>;
diff --git a/crates/salsa/src/lru.rs b/crates/salsa/src/lru.rs
index c6b9778f20a..1ff85a3ea45 100644
--- a/crates/salsa/src/lru.rs
+++ b/crates/salsa/src/lru.rs
@@ -40,7 +40,7 @@ pub(crate) trait LruNode: Sized + Debug {
 
 #[derive(Debug)]
 pub(crate) struct LruIndex {
-    /// Index in the approprate LRU list, or std::usize::MAX if not a
+    /// Index in the appropriate LRU list, or std::usize::MAX if not a
     /// member.
     index: AtomicUsize,
 }