From 87df6ae8cb44d57af11ad342ec55a061d3fac199 Mon Sep 17 00:00:00 2001 From: Andreas Fackler Date: Thu, 12 May 2016 18:52:51 +0300 Subject: [PATCH] fix typos --- src/functions.rs | 4 ++-- tests/compile-fail/functions.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/functions.rs b/src/functions.rs index 37b65e471fa..d9334447226 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -8,7 +8,7 @@ use utils::span_lint; /// **What it does:** Check for functions with too many parameters. /// /// **Why is this bad?** Functions with lots of parameters are considered bad style and reduce -/// readability (“what does the 5th parameter means?”). Consider grouping some parameters into a +/// readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a /// new type. /// /// **Known problems:** None. @@ -70,7 +70,7 @@ impl Functions { span_lint(cx, TOO_MANY_ARGUMENTS, span, - &format!("this function has to many arguments ({}/{})", args, self.threshold)); + &format!("this function has too many arguments ({}/{})", args, self.threshold)); } } } diff --git a/tests/compile-fail/functions.rs b/tests/compile-fail/functions.rs index d3d5eee335a..2cc16568600 100644 --- a/tests/compile-fail/functions.rs +++ b/tests/compile-fail/functions.rs @@ -7,13 +7,13 @@ fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {} fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) { - //~^ ERROR: this function has to many arguments (8/7) + //~^ ERROR: this function has too many arguments (8/7) } trait Foo { fn good(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool); fn bad(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()); - //~^ ERROR: this function has to many arguments (8/7) + //~^ ERROR: this function has too many arguments (8/7) } struct Bar; @@ -21,7 +21,7 @@ struct Bar; impl Bar { fn good_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool) {} fn bad_method(_one: u32, _two: u32, _three: &str, _four: bool, _five: f32, _six: f32, _seven: bool, _eight: ()) {} - //~^ ERROR: this function has to many arguments (8/7) + //~^ ERROR: this function has too many arguments (8/7) } // ok, we don’t want to warn implementations