Remove _ from E0121 diagnostic suggestions

This commit is contained in:
Deadbeef 2021-06-05 21:10:08 +08:00
parent 34b9932f5c
commit d9630848d7
No known key found for this signature in database
GPG key ID: C86982F2EDE0C128
6 changed files with 23 additions and 23 deletions

View file

@ -766,7 +766,7 @@ fn infer_placeholder_type(
if !ty.references_error() {
diag.span_suggestion(
span,
"replace `_` with the correct type",
"replace with the correct type",
ty.to_string(),
Applicability::MaybeIncorrect,
);

View file

@ -14,7 +14,7 @@ LL | static BAR: _ = "test";
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `&str`
| help: replace with the correct type: `&str`
error: aborting due to 2 previous errors

View file

@ -37,7 +37,7 @@ LL | const A = "A".$fn();
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `bool`
| help: replace with the correct type: `bool`
...
LL | / suite! {
LL | | len;

View file

@ -79,7 +79,7 @@ LL | static TEST3: _ = "test";
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `&str`
| help: replace with the correct type: `&str`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:19:15
@ -88,7 +88,7 @@ LL | static TEST4: _ = 145;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:22:15
@ -210,7 +210,7 @@ LL | static B: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:80:15
@ -244,7 +244,7 @@ LL | static FN_TEST3: _ = "test";
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `&str`
| help: replace with the correct type: `&str`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:92:22
@ -253,7 +253,7 @@ LL | static FN_TEST4: _ = 145;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:95:22
@ -435,7 +435,7 @@ LL | const _: Option<_> = map(value);
| ^^^^^^^^^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `Option<u8>`
| help: replace with the correct type: `Option<u8>`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:144:31
@ -526,7 +526,7 @@ LL | const D: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:201:26
@ -639,7 +639,7 @@ LL | const D: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error: aborting due to 69 previous errors; 1 warning emitted

View file

@ -70,7 +70,7 @@ LL | static TEST3: _ = "test";
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `&str`
| help: replace with the correct type: `&str`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:19:15
@ -79,7 +79,7 @@ LL | static TEST4: _ = 145;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:22:15
@ -201,7 +201,7 @@ LL | static B: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:80:15
@ -235,7 +235,7 @@ LL | static FN_TEST3: _ = "test";
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `&str`
| help: replace with the correct type: `&str`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:92:22
@ -244,7 +244,7 @@ LL | static FN_TEST4: _ = 145;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:95:22
@ -426,7 +426,7 @@ LL | const _: Option<_> = map(value);
| ^^^^^^^^^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `Option<u8>`
| help: replace with the correct type: `Option<u8>`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:144:31
@ -517,7 +517,7 @@ LL | const D: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item.rs:201:26
@ -630,7 +630,7 @@ LL | const D: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error: aborting due to 69 previous errors

View file

@ -14,7 +14,7 @@ LL | const TEST2: _ = 42u32;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `u32`
| help: replace with the correct type: `u32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item_help.rs:10:14
@ -23,7 +23,7 @@ LL | const TEST3: _ = Some(42);
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `Option<i32>`
| help: replace with the correct type: `Option<i32>`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item_help.rs:13:22
@ -38,7 +38,7 @@ LL | const TEST5: _ = 42;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
--> $DIR/typeck_type_placeholder_item_help.rs:24:18
@ -47,7 +47,7 @@ LL | const TEST6: _ = 13;
| ^
| |
| not allowed in type signatures
| help: replace `_` with the correct type: `i32`
| help: replace with the correct type: `i32`
error: aborting due to 6 previous errors