fix a bunch of typos found by codespell

This commit is contained in:
Matthias Krüger 2018-07-25 20:02:52 +02:00
parent cfc9b33f17
commit 2665f10662
11 changed files with 17 additions and 17 deletions

View File

@ -65,7 +65,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ExcessivePrecision {
}
impl ExcessivePrecision {
// None if nothing to lint, Some(suggestion) if lint neccessary
// None if nothing to lint, Some(suggestion) if lint necessary
fn check(&self, sym: Symbol, fty: FloatTy) -> Option<String> {
let max = max_digits(fty);
let sym_str = sym.as_str();

View File

@ -2217,7 +2217,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarCollectorVisitor<'a, 'tcx> {
fn visit_expr(&mut self, ex: &'tcx Expr) {
match ex.node {
ExprKind::Path(_) => self.insert_def_id(ex),
// If there is any fuction/method call… we just stop analysis
// If there is any function/method call… we just stop analysis
ExprKind::Call(..) | ExprKind::MethodCall(..) => self.skip = true,
_ => walk_expr(self, ex),

View File

@ -383,7 +383,7 @@ fn check_wild_err_arm(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm]) {
arm.pats[0].span,
"Err(_) will match all errors, maybe not a good idea",
arm.pats[0].span,
"to remove this warning, match each error seperately \
"to remove this warning, match each error separately \
or use unreachable macro");
}
}

View File

@ -11,7 +11,7 @@ use crate::utils::{self, paths, span_lint};
///
/// **Why is this bad?**
/// These operators make it easy to forget that the underlying types actually allow not only three
/// potential Orderings (Less, Equal, Greater) but also a forth one (Uncomparable). This is
/// potential Orderings (Less, Equal, Greater) but also a fourth one (Uncomparable). This is
/// especially easy to miss if the operator based comparison result is negated.
///
/// **Known problems:** None.

View File

@ -700,7 +700,7 @@ declare_clippy_lint! {
/// **What it does:** Checks for casts of a function pointer to a numeric type not enough to store address.
///
/// **Why is this bad?** Casting a function pointer to not eligable type could truncate the address value.
/// **Why is this bad?** Casting a function pointer to not eligible type could truncate the address value.
///
/// **Known problems:** None.
///

View File

@ -334,7 +334,7 @@ pub fn make_assoc(op: AssocOp, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static>
Sugg::BinOp(op, sugg.into())
}
/// Convinience wrapper arround `make_assoc` and `AssocOp::from_ast_binop`.
/// Convenience wrapper around `make_assoc` and `AssocOp::from_ast_binop`.
pub fn make_binop(op: ast::BinOpKind, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static> {
make_assoc(AssocOp::from_ast_binop(op), lhs, rhs)
}

View File

@ -31,11 +31,11 @@ fn main() {
if x.is_ok() {
x = Err(());
x.unwrap(); // not unnecessary because of mutation of x
// it will always panic but the lint is not smart enoguh to see this (it only checks if conditions).
// it will always panic but the lint is not smart enough to see this (it only checks if conditions).
} else {
x = Ok(());
x.unwrap_err(); // not unnecessary because of mutation of x
// it will always panic but the lint is not smart enoguh to see this (it only checks if conditions).
// it will always panic but the lint is not smart enough to see this (it only checks if conditions).
}
}

View File

@ -389,7 +389,7 @@ fn main() {
let m: Rc<HashMap<u64, u64>> = Rc::new(HashMap::new());
for (_, v) in &*m {
let _v = v;
// Here the `*` is not actually necesarry, but the test tests that we don't
// Here the `*` is not actually necessary, but the test tests that we don't
// suggest
// `in *m.values()` as we used to
}

View File

@ -9,7 +9,7 @@ fn foob() -> bool { unimplemented!() }
#[allow(many_single_char_names)]
fn immutable_condition() {
// Should warn when all vars mentionned are immutable
// Should warn when all vars mentioned are immutable
let y = 0;
while y < 10 {
println!("KO - y is immutable");
@ -69,11 +69,11 @@ fn unused_var() {
while i < 3 {
j = 3;
println!("KO - i not mentionned");
println!("KO - i not mentioned");
}
while i < 3 && j > 0 {
println!("KO - i and j not mentionned");
println!("KO - i and j not mentioned");
}
while i < 3 {
@ -84,7 +84,7 @@ fn unused_var() {
while i < 3 && j > 0 {
i = 5;
println!("OK - i in cond and mentionned");
println!("OK - i in cond and mentioned");
}
}

View File

@ -164,7 +164,7 @@ error: Err(_) will match all errors, maybe not a good idea
| ^^^^^^
|
= note: `-D match-wild-err-arm` implied by `-D warnings`
= note: to remove this warning, match each error seperately or use unreachable macro
= note: to remove this warning, match each error separately or use unreachable macro
error: this `match` has identical arm bodies
--> $DIR/matches.rs:131:18
@ -191,7 +191,7 @@ error: Err(_) will match all errors, maybe not a good idea
138 | Err(_) => {panic!()}
| ^^^^^^
|
= note: to remove this warning, match each error seperately or use unreachable macro
= note: to remove this warning, match each error separately or use unreachable macro
error: this `match` has identical arm bodies
--> $DIR/matches.rs:137:18
@ -217,7 +217,7 @@ error: Err(_) will match all errors, maybe not a good idea
144 | Err(_) => {panic!();}
| ^^^^^^
|
= note: to remove this warning, match each error seperately or use unreachable macro
= note: to remove this warning, match each error separately or use unreachable macro
error: this `match` has identical arm bodies
--> $DIR/matches.rs:143:18

View File

@ -14,7 +14,7 @@
<body>
<div class="container" ng-app="clippy" ng-controller="docVersions">
<div class="page-header">
<h1>Clippy lints documention</h1>
<h1>Clippy lints documentation</h1>
</div>
<div ng-cloak>