mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
initialization misspell
This commit is contained in:
parent
fb1934b63f
commit
2be7ad5b39
5 changed files with 18 additions and 18 deletions
|
@ -18,7 +18,7 @@ pub fn install_hook(force_override: bool) {
|
|||
|
||||
// So a little bit of a funny story. Git on unix requires the pre-commit file
|
||||
// to have the `execute` permission to be set. The Rust functions for modifying
|
||||
// these flags doesn't seem to work when executed with normal user permissions.
|
||||
// these flags doesn't seem to work when executed with normal user permissions.
|
||||
//
|
||||
// However, there is a little hack that is also being used by Rust itself in their
|
||||
// setup script. Git saves the `execute` flag when syncing files. This means
|
||||
|
|
|
@ -432,8 +432,8 @@ impl Types {
|
|||
fn check_fn_decl(&mut self, cx: &LateContext<'_>, decl: &FnDecl<'_>, context: CheckTyContext) {
|
||||
// Ignore functions in trait implementations as they are usually forced by the trait definition.
|
||||
//
|
||||
// FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard to
|
||||
// check.
|
||||
// FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard
|
||||
// to check.
|
||||
if context.is_in_trait_impl {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:5:5
|
||||
|
|
||||
LL | let a;
|
||||
|
@ -20,7 +20,7 @@ help: add a semicolon after the `match` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:14:5
|
||||
|
|
||||
LL | let b;
|
||||
|
@ -41,7 +41,7 @@ help: add a semicolon after the `if` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:21:5
|
||||
|
|
||||
LL | let c;
|
||||
|
@ -62,7 +62,7 @@ help: add a semicolon after the `if` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:28:5
|
||||
|
|
||||
LL | let d;
|
||||
|
@ -83,7 +83,7 @@ help: add a semicolon after the `if` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:36:5
|
||||
|
|
||||
LL | let e;
|
||||
|
@ -104,7 +104,7 @@ help: add a semicolon after the `if` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:43:5
|
||||
|
|
||||
LL | let f;
|
||||
|
@ -120,7 +120,7 @@ LL - 1 => f = "three",
|
|||
LL + 1 => "three",
|
||||
|
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:49:5
|
||||
|
|
||||
LL | let g: usize;
|
||||
|
@ -140,7 +140,7 @@ help: add a semicolon after the `if` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:64:5
|
||||
|
|
||||
LL | let a;
|
||||
|
@ -161,7 +161,7 @@ help: add a semicolon after the `match` expression
|
|||
LL | };
|
||||
| +
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init.rs:81:5
|
||||
|
|
||||
LL | let a;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:6:5
|
||||
|
|
||||
LL | let a;
|
||||
|
@ -10,7 +10,7 @@ help: declare `a` here
|
|||
LL | let a = "zero";
|
||||
| ~~~~~
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:9:5
|
||||
|
|
||||
LL | let b;
|
||||
|
@ -21,7 +21,7 @@ help: declare `b` here
|
|||
LL | let b = 1;
|
||||
| ~~~~~
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:10:5
|
||||
|
|
||||
LL | let c;
|
||||
|
@ -32,7 +32,7 @@ help: declare `c` here
|
|||
LL | let c = 2;
|
||||
| ~~~~~
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:14:5
|
||||
|
|
||||
LL | let d: usize;
|
||||
|
@ -43,7 +43,7 @@ help: declare `d` here
|
|||
LL | let d: usize = 1;
|
||||
| ~~~~~~~~~~~~
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:17:5
|
||||
|
|
||||
LL | let mut e;
|
||||
|
@ -54,7 +54,7 @@ help: declare `e` here
|
|||
LL | let mut e = 1;
|
||||
| ~~~~~~~~~
|
||||
|
||||
error: unneeded late initalization
|
||||
error: unneeded late initialization
|
||||
--> $DIR/needless_late_init_fixable.rs:21:5
|
||||
|
|
||||
LL | let h;
|
||||
|
|
Loading…
Reference in a new issue