diff options
| author | lcnr <rust@lcnr.de> | 2022-01-05 11:43:21 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-01-18 12:23:43 +0100 |
| commit | b2d8f0c77db87cc84551598ceba3f4e8615eb66c (patch) | |
| tree | 7867c58ba587c6eb7f7928bd7fb3da22f9f695e1 /src/test/ui/suggestions | |
| parent | 621e60a54fc1b0b06517b354edd4fda006723f8f (diff) | |
| download | rust-b2d8f0c77db87cc84551598ceba3f4e8615eb66c.tar.gz rust-b2d8f0c77db87cc84551598ceba3f4e8615eb66c.zip | |
generic_arg_infer: placeholder in signature err
Diffstat (limited to 'src/test/ui/suggestions')
| -rw-r--r-- | src/test/ui/suggestions/unnamable-types.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/suggestions/unnamable-types.stderr | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/suggestions/unnamable-types.rs b/src/test/ui/suggestions/unnamable-types.rs index 483f9bbb48c..f2485041d9b 100644 --- a/src/test/ui/suggestions/unnamable-types.rs +++ b/src/test/ui/suggestions/unnamable-types.rs @@ -8,14 +8,14 @@ const A = 5; //~| HELP: provide a type for the constant static B: _ = "abc"; -//~^ ERROR: the type placeholder `_` is not allowed within types on item signatures for static variables +//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for static variables //~| NOTE: not allowed in type signatures //~| HELP: replace with the correct type // FIXME: this should also suggest a function pointer, as the closure is non-capturing const C: _ = || 42; -//~^ ERROR: the type placeholder `_` is not allowed within types on item signatures for constants +//~^ ERROR: the placeholder `_` is not allowed within types on item signatures for constants //~| NOTE: not allowed in type signatures //~| NOTE: however, the inferred type diff --git a/src/test/ui/suggestions/unnamable-types.stderr b/src/test/ui/suggestions/unnamable-types.stderr index 3a489a6e943..6127446c83e 100644 --- a/src/test/ui/suggestions/unnamable-types.stderr +++ b/src/test/ui/suggestions/unnamable-types.stderr @@ -4,7 +4,7 @@ error: missing type for `const` item LL | const A = 5; | ^ help: provide a type for the constant: `A: i32` -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static variables +error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables --> $DIR/unnamable-types.rs:10:11 | LL | static B: _ = "abc"; @@ -13,7 +13,7 @@ LL | static B: _ = "abc"; | not allowed in type signatures | help: replace with the correct type: `&str` -error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constants +error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants --> $DIR/unnamable-types.rs:17:10 | LL | const C: _ = || 42; |
