Fix some spelling mistakes here and there
This commit is contained in:
parent
1c93048bc9
commit
7877a42308
8 changed files with 14 additions and 14 deletions
|
|
@ -47,7 +47,7 @@ declare_lint! {
|
|||
/// match foo {
|
||||
/// Bar => bar(),
|
||||
/// Quz => quz(),
|
||||
/// Baz => bar(), // <= oups
|
||||
/// Baz => bar(), // <= oops
|
||||
/// }
|
||||
/// ```
|
||||
declare_lint! {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use utils::{match_path, span_lint_and_then};
|
|||
///
|
||||
/// **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)
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ declare_lint! {
|
|||
"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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -110,10 +110,10 @@ impl EarlyLintPass for MiscEarly {
|
|||
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()));;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ impl LateLintPass for BoolComparison {
|
|||
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 @@ impl LateLintPass for BoolComparison {
|
|||
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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use utils::differing_macro_contexts;
|
|||
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,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue