remove obsolete test comments

This commit is contained in:
J-ZhengLi 2023-12-25 09:39:32 +08:00
parent 60c059114c
commit a9baf344b8
6 changed files with 21 additions and 29 deletions

View File

@ -73,8 +73,6 @@ mod nested_local {
mod function_def { mod function_def {
fn ret_f64() -> f64 { fn ret_f64() -> f64 {
// Even though the output type is specified,
// this unsuffixed literal is linted to reduce heuristics and keep codebase simple.
1. 1.
} }

View File

@ -73,8 +73,6 @@ fn test() {
mod function_def { mod function_def {
fn ret_f64() -> f64 { fn ret_f64() -> f64 {
// Even though the output type is specified,
// this unsuffixed literal is linted to reduce heuristics and keep codebase simple.
1. 1.
} }

View File

@ -86,55 +86,55 @@ LL | let y = 1.;
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:84:27 --> $DIR/default_numeric_fallback_f64.rs:82:27
| |
LL | let f = || -> _ { 1. }; LL | let f = || -> _ { 1. };
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:88:29 --> $DIR/default_numeric_fallback_f64.rs:86:29
| |
LL | let f = || -> f64 { 1. }; LL | let f = || -> f64 { 1. };
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:102:21 --> $DIR/default_numeric_fallback_f64.rs:100:21
| |
LL | generic_arg(1.); LL | generic_arg(1.);
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:105:32 --> $DIR/default_numeric_fallback_f64.rs:103:32
| |
LL | let x: _ = generic_arg(1.); LL | let x: _ = generic_arg(1.);
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:123:28 --> $DIR/default_numeric_fallback_f64.rs:121:28
| |
LL | GenericStruct { x: 1. }; LL | GenericStruct { x: 1. };
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:126:36 --> $DIR/default_numeric_fallback_f64.rs:124:36
| |
LL | let _ = GenericStruct { x: 1. }; LL | let _ = GenericStruct { x: 1. };
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:144:24 --> $DIR/default_numeric_fallback_f64.rs:142:24
| |
LL | GenericEnum::X(1.); LL | GenericEnum::X(1.);
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:164:23 --> $DIR/default_numeric_fallback_f64.rs:162:23
| |
LL | s.generic_arg(1.); LL | s.generic_arg(1.);
| ^^ help: consider adding suffix: `1.0_f64` | ^^ help: consider adding suffix: `1.0_f64`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_f64.rs:174:25 --> $DIR/default_numeric_fallback_f64.rs:172:25
| |
LL | inline!(let x = 22.;); LL | inline!(let x = 22.;);
| ^^^ help: consider adding suffix: `22.0_f64` | ^^^ help: consider adding suffix: `22.0_f64`

View File

@ -74,8 +74,6 @@ mod nested_local {
mod function_def { mod function_def {
fn ret_i32() -> i32 { fn ret_i32() -> i32 {
// Even though the output type is specified,
// this unsuffixed literal is linted to reduce heuristics and keep codebase simple.
1 1
} }

View File

@ -74,8 +74,6 @@ fn test() {
mod function_def { mod function_def {
fn ret_i32() -> i32 { fn ret_i32() -> i32 {
// Even though the output type is specified,
// this unsuffixed literal is linted to reduce heuristics and keep codebase simple.
1 1
} }

View File

@ -98,55 +98,55 @@ LL | let y = 1;
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:85:27 --> $DIR/default_numeric_fallback_i32.rs:83:27
| |
LL | let f = || -> _ { 1 }; LL | let f = || -> _ { 1 };
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:89:29 --> $DIR/default_numeric_fallback_i32.rs:87:29
| |
LL | let f = || -> i32 { 1 }; LL | let f = || -> i32 { 1 };
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:103:21 --> $DIR/default_numeric_fallback_i32.rs:101:21
| |
LL | generic_arg(1); LL | generic_arg(1);
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:106:32 --> $DIR/default_numeric_fallback_i32.rs:104:32
| |
LL | let x: _ = generic_arg(1); LL | let x: _ = generic_arg(1);
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:124:28 --> $DIR/default_numeric_fallback_i32.rs:122:28
| |
LL | GenericStruct { x: 1 }; LL | GenericStruct { x: 1 };
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:127:36 --> $DIR/default_numeric_fallback_i32.rs:125:36
| |
LL | let _ = GenericStruct { x: 1 }; LL | let _ = GenericStruct { x: 1 };
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:145:24 --> $DIR/default_numeric_fallback_i32.rs:143:24
| |
LL | GenericEnum::X(1); LL | GenericEnum::X(1);
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:165:23 --> $DIR/default_numeric_fallback_i32.rs:163:23
| |
LL | s.generic_arg(1); LL | s.generic_arg(1);
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:175:25 --> $DIR/default_numeric_fallback_i32.rs:173:25
| |
LL | inline!(let x = 22;); LL | inline!(let x = 22;);
| ^^ help: consider adding suffix: `22_i32` | ^^ help: consider adding suffix: `22_i32`
@ -154,19 +154,19 @@ LL | inline!(let x = 22;);
= note: this error originates in the macro `__inline_mac_fn_internal` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `__inline_mac_fn_internal` (in Nightly builds, run with -Z macro-backtrace for more info)
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:217:29 --> $DIR/default_numeric_fallback_i32.rs:215:29
| |
LL | let data_i32 = vec![1, 2, 3]; LL | let data_i32 = vec![1, 2, 3];
| ^ help: consider adding suffix: `1_i32` | ^ help: consider adding suffix: `1_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:217:32 --> $DIR/default_numeric_fallback_i32.rs:215:32
| |
LL | let data_i32 = vec![1, 2, 3]; LL | let data_i32 = vec![1, 2, 3];
| ^ help: consider adding suffix: `2_i32` | ^ help: consider adding suffix: `2_i32`
error: default numeric fallback might occur error: default numeric fallback might occur
--> $DIR/default_numeric_fallback_i32.rs:217:35 --> $DIR/default_numeric_fallback_i32.rs:215:35
| |
LL | let data_i32 = vec![1, 2, 3]; LL | let data_i32 = vec![1, 2, 3];
| ^ help: consider adding suffix: `3_i32` | ^ help: consider adding suffix: `3_i32`