diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-09-29 03:28:52 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-09-29 03:28:52 +0000 |
| commit | eceb48534a4fdabfaf378ea02a2c5cd43b8c52a5 (patch) | |
| tree | 0e6271782f35884bc9869cf32e6275f4e6f9a83d /tests/ui/variance | |
| parent | 8d72d3e1e96f58ca10059a6bb6e8aecba4a0e9cd (diff) | |
| download | rust-eceb48534a4fdabfaf378ea02a2c5cd43b8c52a5.tar.gz rust-eceb48534a4fdabfaf378ea02a2c5cd43b8c52a5.zip | |
Make replacement suggestion `_` in type verbose
```
error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
--> $DIR/in-signature.rs:6:21
|
LL | fn arr_fn() -> [u8; _] {
| ^ not allowed in type signatures
|
help: replace with the correct return type
|
LL - fn arr_fn() -> [u8; _] {
LL + fn arr_fn() -> [u8; 3] {
|
```
Diffstat (limited to 'tests/ui/variance')
| -rw-r--r-- | tests/ui/variance/leaking-unnameables.stderr | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/ui/variance/leaking-unnameables.stderr b/tests/ui/variance/leaking-unnameables.stderr index 92afe952801..59bdc33040d 100644 --- a/tests/ui/variance/leaking-unnameables.stderr +++ b/tests/ui/variance/leaking-unnameables.stderr @@ -2,10 +2,13 @@ error[E0121]: the placeholder `_` is not allowed within types on item signatures --> $DIR/leaking-unnameables.rs:8:18 | LL | pub fn f<T>() -> _ { - | ^ - | | - | not allowed in type signatures - | help: replace with the correct return type: `fn()` + | ^ not allowed in type signatures + | +help: replace with the correct return type + | +LL - pub fn f<T>() -> _ { +LL + pub fn f<T>() -> fn() { + | error: aborting due to 1 previous error |
