From bbca15c5b0d5b384ff9cee3a63fbad544db97f2d Mon Sep 17 00:00:00 2001 From: shandongbinzhou Date: Fri, 29 Mar 2024 16:20:22 +0800 Subject: [PATCH] chore: fix typo in comment Signed-off-by: shandongbinzhou --- chalk-integration/src/lowering/env.rs | 2 +- chalk-recursive/src/fixed_point/stack.rs | 2 +- chalk-solve/src/clauses/builtin_traits/clone.rs | 2 +- chalk-solve/src/rust_ir.rs | 2 +- tests/test/functions.rs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chalk-integration/src/lowering/env.rs b/chalk-integration/src/lowering/env.rs index 4f383ba8ab7..f399830bbc4 100644 --- a/chalk-integration/src/lowering/env.rs +++ b/chalk-integration/src/lowering/env.rs @@ -230,7 +230,7 @@ impl Env<'_> { I: IntoIterator>, I::IntoIter: ExactSizeIterator, { - // As binders to introduce we recieve `ParameterKind`, + // As binders to introduce we receive `ParameterKind`, // which we need to transform into `(Ident, ParameterKind)`, // because that is the key-value pair for ParameterMap. // `swap_inner` lets us do precisely that, replacing `Ident` inside diff --git a/chalk-recursive/src/fixed_point/stack.rs b/chalk-recursive/src/fixed_point/stack.rs index 9669d5f0f92..fa2af66ea0f 100644 --- a/chalk-recursive/src/fixed_point/stack.rs +++ b/chalk-recursive/src/fixed_point/stack.rs @@ -45,7 +45,7 @@ impl Stack { }; if depth.depth >= self.overflow_depth { - // This shoudl perhaps be a result or something, though + // This should perhaps be a result or something, though // really I'd prefer to move to subgoal abstraction for // guaranteeing termination. -nmatsakis panic!("overflow depth reached") diff --git a/chalk-solve/src/clauses/builtin_traits/clone.rs b/chalk-solve/src/clauses/builtin_traits/clone.rs index 6d6b3a3626e..2e35c9a6894 100644 --- a/chalk-solve/src/clauses/builtin_traits/clone.rs +++ b/chalk-solve/src/clauses/builtin_traits/clone.rs @@ -11,6 +11,6 @@ pub fn add_clone_program_clauses( ty: TyKind, binders: &CanonicalVarKinds, ) -> Result<(), Floundered> { - // Implement Clone for types that automaticly implement Copy + // Implement Clone for types that automatically implement Copy add_copy_program_clauses(db, builder, trait_ref, ty, binders) } diff --git a/chalk-solve/src/rust_ir.rs b/chalk-solve/src/rust_ir.rs index 3933b95f1ad..9c29814ff7b 100644 --- a/chalk-solve/src/rust_ir.rs +++ b/chalk-solve/src/rust_ir.rs @@ -138,7 +138,7 @@ impl AdtSizeAlign { } #[derive(Clone, Debug, PartialEq, Eq, Hash)] -/// A rust intermediate represention (rust_ir) of a function definition/declaration. +/// A rust intermediate representation (rust_ir) of a function definition/declaration. /// For example, in the following rust code: /// /// ```ignore diff --git a/tests/test/functions.rs b/tests/test/functions.rs index 7105c908b9a..e515706fee3 100644 --- a/tests/test/functions.rs +++ b/tests/test/functions.rs @@ -108,7 +108,7 @@ fn function_implement_fn_traits() { expect![["No possible solution"]] } - // Function pointres implicity return `()` when no return + // Function pointers implicit return `()` when no return // type is specified - make sure that normalization understands // this goal { @@ -205,7 +205,7 @@ fn function_implement_fn_traits() { expect![["Unique"]] } - // Similiar to the above test, but for types instead of lifetimes: + // Similar to the above test, but for types instead of lifetimes: // a 'stricter' function (requires types to be the same) can never // implement `FnOnce` for a 'less strict' signature (does not require // types to be the same)