Skip to content

Commit 4b7146d

Browse files
committed
Fix some minor issues in comments
Signed-off-by: zhoujiaweii <[email protected]>
1 parent 1a7127c commit 4b7146d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/reference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl LateLintPass<'_> for DerefAddrOf {
8383

8484
/// Is this a `ManuallyDrop` reached through a union, and when is `DerefMut` called on it?
8585
enum ManuallyDropThroughUnion {
86-
/// `ManuallyDrop` reached through a union and immediately explicitely dereferenced
86+
/// `ManuallyDrop` reached through a union and immediately explicitly dereferenced
8787
Directly,
8888
/// `ManuallyDrop` reached through a union, and dereferenced later on
8989
Indirect,

clippy_utils/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ impl<'tcx> ConstEvalCtxt<'tcx> {
411411
}
412412
}
413413

414-
/// Attempts to evaluate the expression and returns both the value and whether it's dependant on
414+
/// Attempts to evaluate the expression and returns both the value and whether it's dependent on
415415
/// other items.
416416
pub fn eval_with_source(&self, e: &Expr<'_>) -> Option<(Constant<'tcx>, ConstantSource)> {
417417
self.source.set(ConstantSource::Local);

clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
11981198

11991199
pub fn hash_path(&mut self, path: &Path<'_>) {
12001200
match path.res {
1201-
// constant hash since equality is dependant on inter-expression context
1201+
// constant hash since equality is dependent on inter-expression context
12021202
// e.g. The expressions `if let Some(x) = foo() {}` and `if let Some(y) = foo() {}` are considered equal
12031203
// even though the binding names are different and they have different `HirId`s.
12041204
Res::Local(_) => 1_usize.hash(&mut self.s),

0 commit comments

Comments
 (0)