chore: fix some typos in comments

Signed-off-by: forcedebug <forcedebug@outlook.com>
This commit is contained in:
forcedebug 2024-04-23 20:31:26 +08:00
parent 7fcaa60efd
commit d55e5b4500
7 changed files with 7 additions and 7 deletions

View file

@ -24,7 +24,7 @@ declare_clippy_lint! {
///
/// ### Limitations
/// This lint does not check for implied bounds transitively. Meaning that
/// it does't check for implied bounds from supertraits of supertraits
/// it doesn't check for implied bounds from supertraits of supertraits
/// (e.g. `trait A {} trait B: A {} trait C: B {}`, then having an `fn() -> impl A + C`)
///
/// ### Example

View file

@ -78,7 +78,7 @@ pub(super) fn check(cx: &LateContext<'_>, call_expr: &Expr<'_>, recv: &Expr<'_>,
&& match_def_path(cx, enumerate_defid, &CORE_ITER_ENUMERATE_METHOD)
{
// Check if the tuple type was explicit. It may be the type system _needs_ the type of the element
// that would be explicited in the closure.
// that would be explicitly in the closure.
let new_closure_param = match find_elem_explicit_type_span(closure.fn_decl) {
// We have an explicit type. Get its snippet, that of the binding name, and do `binding: ty`.
// Fallback to `..` if we fail getting either snippet.

View file

@ -28,7 +28,7 @@ declare_clippy_lint! {
/// fn size(&self) -> usize {
/// // Note that `&self` as an argument is a `&&Foo`: Because `self`
/// // is already a reference, `&self` is a double-reference.
/// // The return value of `size_of_val()` therefor is the
/// // The return value of `size_of_val()` therefore is the
/// // size of the reference-type, not the size of `self`.
/// std::mem::size_of_val(&self)
/// }