From 4b7146dc1b8b502e2d5decc1e67fd438fe5d0e84 Mon Sep 17 00:00:00 2001 From: zhoujiaweii Date: Fri, 29 Aug 2025 15:45:26 +0800 Subject: [PATCH] Fix some minor issues in comments Signed-off-by: zhoujiaweii --- clippy_lints/src/reference.rs | 2 +- clippy_utils/src/consts.rs | 2 +- clippy_utils/src/hir_utils.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/reference.rs b/clippy_lints/src/reference.rs index 3bbcad12a319..c2469ab2dddd 100644 --- a/clippy_lints/src/reference.rs +++ b/clippy_lints/src/reference.rs @@ -83,7 +83,7 @@ impl LateLintPass<'_> for DerefAddrOf { /// Is this a `ManuallyDrop` reached through a union, and when is `DerefMut` called on it? enum ManuallyDropThroughUnion { - /// `ManuallyDrop` reached through a union and immediately explicitely dereferenced + /// `ManuallyDrop` reached through a union and immediately explicitly dereferenced Directly, /// `ManuallyDrop` reached through a union, and dereferenced later on Indirect, diff --git a/clippy_utils/src/consts.rs b/clippy_utils/src/consts.rs index ecd88daa6b39..2cb838ef2090 100644 --- a/clippy_utils/src/consts.rs +++ b/clippy_utils/src/consts.rs @@ -411,7 +411,7 @@ impl<'tcx> ConstEvalCtxt<'tcx> { } } - /// Attempts to evaluate the expression and returns both the value and whether it's dependant on + /// Attempts to evaluate the expression and returns both the value and whether it's dependent on /// other items. pub fn eval_with_source(&self, e: &Expr<'_>) -> Option<(Constant<'tcx>, ConstantSource)> { self.source.set(ConstantSource::Local); diff --git a/clippy_utils/src/hir_utils.rs b/clippy_utils/src/hir_utils.rs index b79e15cd7170..931dd396ec82 100644 --- a/clippy_utils/src/hir_utils.rs +++ b/clippy_utils/src/hir_utils.rs @@ -1198,7 +1198,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> { pub fn hash_path(&mut self, path: &Path<'_>) { match path.res { - // constant hash since equality is dependant on inter-expression context + // constant hash since equality is dependent on inter-expression context // e.g. The expressions `if let Some(x) = foo() {}` and `if let Some(y) = foo() {}` are considered equal // even though the binding names are different and they have different `HirId`s. Res::Local(_) => 1_usize.hash(&mut self.s),