about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-05 09:19:07 +0000
committerbors <bors@rust-lang.org>2022-08-05 09:19:07 +0000
commit57731f1dd758eb40d3d2cbc09d4c68ad37669abb (patch)
tree79f2aeb4c721ba5b0e5e805c0e097f452a44b4fb
parent2dc7d2f7f5a3b1254f901d61e5c6a685463e8196 (diff)
parentf63b324ab1f37c6238af3070eb0c7c33230e43a8 (diff)
downloadrust-57731f1dd758eb40d3d2cbc09d4c68ad37669abb.tar.gz
rust-57731f1dd758eb40d3d2cbc09d4c68ad37669abb.zip
Auto merge of #9292 - alex-semenyuk:typos_fixed, r=Alexendoo
Fix some typos

changelog: none
-rw-r--r--clippy_lints/src/missing_const_for_fn.rs4
-rw-r--r--clippy_lints/src/utils/internal_lints.rs2
-rw-r--r--tests/ui-internal/check_clippy_version_attribute.stderr4
3 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/missing_const_for_fn.rs b/clippy_lints/src/missing_const_for_fn.rs
index 16d65966c10..2bd920db302 100644
--- a/clippy_lints/src/missing_const_for_fn.rs
+++ b/clippy_lints/src/missing_const_for_fn.rs
@@ -124,7 +124,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
             FnKind::Method(_, sig, ..) => {
                 if trait_ref_of_method(cx, def_id).is_some()
                     || already_const(sig.header)
-                    || method_accepts_dropable(cx, sig.decl.inputs)
+                    || method_accepts_droppable(cx, sig.decl.inputs)
                 {
                     return;
                 }
@@ -159,7 +159,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingConstForFn {
 
 /// Returns true if any of the method parameters is a type that implements `Drop`. The method
 /// can't be made const then, because `drop` can't be const-evaluated.
-fn method_accepts_dropable(cx: &LateContext<'_>, param_tys: &[hir::Ty<'_>]) -> bool {
+fn method_accepts_droppable(cx: &LateContext<'_>, param_tys: &[hir::Ty<'_>]) -> bool {
     // If any of the params are droppable, return true
     param_tys.iter().any(|hir_ty| {
         let ty_ty = hir_ty_to_ty(cx.tcx, hir_ty);
diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs
index b309653291b..3de96f72bbc 100644
--- a/clippy_lints/src/utils/internal_lints.rs
+++ b/clippy_lints/src/utils/internal_lints.rs
@@ -569,7 +569,7 @@ fn check_invalid_clippy_version_attribute(cx: &LateContext<'_>, item: &'_ Item<'
                 item.span,
                 "this item has an invalid `clippy::version` attribute",
                 None,
-                "please use a valid sematic version, see `doc/adding_lints.md`",
+                "please use a valid semantic version, see `doc/adding_lints.md`",
             );
         }
     } else {
diff --git a/tests/ui-internal/check_clippy_version_attribute.stderr b/tests/ui-internal/check_clippy_version_attribute.stderr
index 5331075885c..2aa4de490bc 100644
--- a/tests/ui-internal/check_clippy_version_attribute.stderr
+++ b/tests/ui-internal/check_clippy_version_attribute.stderr
@@ -16,7 +16,7 @@ note: the lint level is defined here
 LL | #![deny(clippy::internal)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(clippy::invalid_clippy_version_attribute)]` implied by `#[deny(clippy::internal)]`
-   = help: please use a valid sematic version, see `doc/adding_lints.md`
+   = help: please use a valid semantic version, see `doc/adding_lints.md`
    = note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: this item has an invalid `clippy::version` attribute
@@ -31,7 +31,7 @@ LL | |     report_in_external_macro: true
 LL | | }
    | |_^
    |
-   = help: please use a valid sematic version, see `doc/adding_lints.md`
+   = help: please use a valid semantic version, see `doc/adding_lints.md`
    = note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: this lint is missing the `clippy::version` attribute or version value