initialization misspell

This commit is contained in:
whodi 2022-04-15 15:00:44 -04:00 committed by Manish Goregaokar
parent fb1934b63f
commit 2be7ad5b39
5 changed files with 18 additions and 18 deletions

View File

@ -432,8 +432,8 @@ pub fn new(vec_box_size_threshold: u64, type_complexity_threshold: u64, avoid_br
fn check_fn_decl(&mut self, cx: &LateContext<'_>, decl: &FnDecl<'_>, context: CheckTyContext) { 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. // 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 // FIXME: ideally we would like to warn *if the complicated type can be simplified*, but it's hard
// check. // to check.
if context.is_in_trait_impl { if context.is_in_trait_impl {
return; return;
} }

View File

@ -1,4 +1,4 @@
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:5:5 --> $DIR/needless_late_init.rs:5:5
| |
LL | let a; LL | let a;
@ -20,7 +20,7 @@ help: add a semicolon after the `match` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:14:5 --> $DIR/needless_late_init.rs:14:5
| |
LL | let b; LL | let b;
@ -41,7 +41,7 @@ help: add a semicolon after the `if` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:21:5 --> $DIR/needless_late_init.rs:21:5
| |
LL | let c; LL | let c;
@ -62,7 +62,7 @@ help: add a semicolon after the `if` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:28:5 --> $DIR/needless_late_init.rs:28:5
| |
LL | let d; LL | let d;
@ -83,7 +83,7 @@ help: add a semicolon after the `if` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:36:5 --> $DIR/needless_late_init.rs:36:5
| |
LL | let e; LL | let e;
@ -104,7 +104,7 @@ help: add a semicolon after the `if` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:43:5 --> $DIR/needless_late_init.rs:43:5
| |
LL | let f; LL | let f;
@ -120,7 +120,7 @@ LL - 1 => f = "three",
LL + 1 => "three", LL + 1 => "three",
| |
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:49:5 --> $DIR/needless_late_init.rs:49:5
| |
LL | let g: usize; LL | let g: usize;
@ -140,7 +140,7 @@ help: add a semicolon after the `if` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:64:5 --> $DIR/needless_late_init.rs:64:5
| |
LL | let a; LL | let a;
@ -161,7 +161,7 @@ help: add a semicolon after the `match` expression
LL | }; LL | };
| + | +
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init.rs:81:5 --> $DIR/needless_late_init.rs:81:5
| |
LL | let a; LL | let a;

View File

@ -1,4 +1,4 @@
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:6:5 --> $DIR/needless_late_init_fixable.rs:6:5
| |
LL | let a; LL | let a;
@ -10,7 +10,7 @@ help: declare `a` here
LL | let a = "zero"; LL | let a = "zero";
| ~~~~~ | ~~~~~
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:9:5 --> $DIR/needless_late_init_fixable.rs:9:5
| |
LL | let b; LL | let b;
@ -21,7 +21,7 @@ help: declare `b` here
LL | let b = 1; LL | let b = 1;
| ~~~~~ | ~~~~~
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:10:5 --> $DIR/needless_late_init_fixable.rs:10:5
| |
LL | let c; LL | let c;
@ -32,7 +32,7 @@ help: declare `c` here
LL | let c = 2; LL | let c = 2;
| ~~~~~ | ~~~~~
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:14:5 --> $DIR/needless_late_init_fixable.rs:14:5
| |
LL | let d: usize; LL | let d: usize;
@ -43,7 +43,7 @@ help: declare `d` here
LL | let d: usize = 1; LL | let d: usize = 1;
| ~~~~~~~~~~~~ | ~~~~~~~~~~~~
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:17:5 --> $DIR/needless_late_init_fixable.rs:17:5
| |
LL | let mut e; LL | let mut e;
@ -54,7 +54,7 @@ help: declare `e` here
LL | let mut e = 1; LL | let mut e = 1;
| ~~~~~~~~~ | ~~~~~~~~~
error: unneeded late initalization error: unneeded late initialization
--> $DIR/needless_late_init_fixable.rs:21:5 --> $DIR/needless_late_init_fixable.rs:21:5
| |
LL | let h; LL | let h;