]> git.lizzy.rs Git - rust.git/commitdiff
Fix some spelling mistakes here and there
authormcarton <cartonmartin+git@gmail.com>
Sat, 19 Mar 2016 14:06:56 +0000 (15:06 +0100)
committermcarton <cartonmartin+git@gmail.com>
Mon, 28 Mar 2016 19:24:36 +0000 (21:24 +0200)
src/copies.rs
src/derive.rs
src/items_after_statements.rs
src/lib.rs
src/misc_early.rs
src/needless_bool.rs
src/utils/hir.rs
tests/compile-fail/bool_comparison.rs

index 789f852c6c35902496a0d64a39c66f7e58c5afb9..04f8aaa37e7bedfa087aa5a843f45669254d5157 100644 (file)
@@ -47,7 +47,7 @@
 /// match foo {
 ///     Bar => bar(),
 ///     Quz => quz(),
-///     Baz => bar(), // <= oups
+///     Baz => bar(), // <= oops
 /// }
 /// ```
 declare_lint! {
index 4a20d8018de814c30b38e6841e7dc571403d5518..ab4f73eafc099f40784a16e0c9d6a9632ceb1032 100644 (file)
@@ -14,7 +14,7 @@
 ///
 /// **Why is this bad?** The implementation of these traits must agree (for example for use with
 /// `HashMap`) so it’s probably a bad idea to use a default-generated `Hash` implementation  with
-/// an explicitely defined `PartialEq`. In particular, the following must hold for any type:
+/// an explicitly defined `PartialEq`. In particular, the following must hold for any type:
 ///
 /// ```rust
 /// k1 == k2 ⇒ hash(k1) == hash(k2)
index a2ab72469429028d1edd79ac566d882466958a30..952dcb7ed9c4b2417268bfbce78a4c7cf69e255c 100644 (file)
     "finds blocks where an item comes after a statement"
 }
 
-pub struct ItemsAfterStatemets;
+pub struct ItemsAfterStatements;
 
-impl LintPass for ItemsAfterStatemets {
+impl LintPass for ItemsAfterStatements {
     fn get_lints(&self) -> LintArray {
         lint_array!(ITEMS_AFTER_STATEMENTS)
     }
 }
 
-impl EarlyLintPass for ItemsAfterStatemets {
+impl EarlyLintPass for ItemsAfterStatements {
     fn check_block(&mut self, cx: &EarlyContext, item: &Block) {
         if in_macro(cx, item.span) {
             return;
index 7d24b2c89248289d9fb39e860ef3cebe3b60cbdc..75b5ec4cc23a359a93cd257e2d8bd12168abf1a2 100644 (file)
@@ -134,7 +134,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
         }
         Err((err, span)) => {
             reg.sess.struct_span_err(span, err)
-                    .span_note(span, "Clippy will use defaulf configuration")
+                    .span_note(span, "Clippy will use default configuration")
                     .emit();
             utils::conf::Conf::default()
         }
@@ -163,7 +163,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
     reg.register_early_lint_pass(box precedence::Precedence);
     reg.register_late_lint_pass(box eta_reduction::EtaPass);
     reg.register_late_lint_pass(box identity_op::IdentityOp);
-    reg.register_early_lint_pass(box items_after_statements::ItemsAfterStatemets);
+    reg.register_early_lint_pass(box items_after_statements::ItemsAfterStatements);
     reg.register_late_lint_pass(box mut_mut::MutMut);
     reg.register_late_lint_pass(box mut_reference::UnnecessaryMutPassed);
     reg.register_late_lint_pass(box len_zero::LenZero);
index 60e175d63826436adf42082b3053f4d224e0f61d..b1c584a4b3e0fe039f325fd291a10c3fd143c345 100644 (file)
@@ -110,10 +110,10 @@ fn check_fn(&mut self, cx: &EarlyContext, _: FnKind, decl: &FnDecl, _: &Block, _
                 let arg_name = sp_ident.node.to_string();
 
                 if arg_name.starts_with('_') {
-                    if let Some(correspondance) = registered_names.get(&arg_name[1..]) {
+                    if let Some(correspondence) = registered_names.get(&arg_name[1..]) {
                         span_lint(cx,
                                   DUPLICATE_UNDERSCORE_ARGUMENT,
-                                  *correspondance,
+                                  *correspondence,
                                   &format!("`{}` already exists, having another argument having almost the same \
                                             name makes code comprehension and documentation more difficult",
                                            arg_name[1..].to_owned()));;
index 43e7cfddadd071709ab84b2b54332ae1982bc946..ab5a1e26b20c48383d972ffd60c98f2eea8e3b7c 100644 (file)
@@ -105,7 +105,7 @@ fn check_expr(&mut self, cx: &LateContext, e: &Expr) {
                     span_lint_and_then(cx,
                                        BOOL_COMPARISON,
                                        e.span,
-                                       "equality checks against true are unnecesary",
+                                       "equality checks against true are unnecessary",
                                        |db| {
                                            db.span_suggestion(e.span, "try simplifying it as shown:", hint);
                                        });
@@ -115,7 +115,7 @@ fn check_expr(&mut self, cx: &LateContext, e: &Expr) {
                     span_lint_and_then(cx,
                                        BOOL_COMPARISON,
                                        e.span,
-                                       "equality checks against true are unnecesary",
+                                       "equality checks against true are unnecessary",
                                        |db| {
                                            db.span_suggestion(e.span, "try simplifying it as shown:", hint);
                                        });
index ed2a49b3caa4c189ce9b81c5182ae4b2a39fe0fe..20c7e33fbb2bc180b4a4289c1d9abb96fe2a01a9 100644 (file)
@@ -13,7 +13,7 @@
 pub struct SpanlessEq<'a, 'tcx: 'a> {
     /// Context used to evaluate constant expressions.
     cx: &'a LateContext<'a, 'tcx>,
-    /// If is true, never consider as equal expressions containing fonction calls.
+    /// If is true, never consider as equal expressions containing function calls.
     ignore_fn: bool,
 }
 
index 8a792931d02c7214642b7115665ccf83d66e1f31..836759455197f08d427d15e67b270f6c212902dd 100644 (file)
@@ -5,7 +5,7 @@
 fn main() {
     let x = true;
     if x == true { "yes" } else { "no" };
-    //~^ ERROR equality checks against true are unnecesary
+    //~^ ERROR equality checks against true are unnecessary
     //~| HELP try simplifying it as shown:
     //~| SUGGESTION if x { "yes" } else { "no" };
     if x == false { "yes" } else { "no" };
@@ -13,7 +13,7 @@ fn main() {
     //~| HELP try simplifying it as shown:
     //~| SUGGESTION if !x { "yes" } else { "no" };
     if true == x { "yes" } else { "no" };
-    //~^ ERROR equality checks against true are unnecesary
+    //~^ ERROR equality checks against true are unnecessary
     //~| HELP try simplifying it as shown:
     //~| SUGGESTION if x { "yes" } else { "no" };
     if false == x { "yes" } else { "no" };