about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-12-23 14:16:34 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-12-29 19:11:27 -0800
commit8cb193a5cb694ba62c83fb63a804f22720a118cf (patch)
tree69b9d30a3abea1300ff7a7ddde7d5e14d492e891 /src/test/ui/error-codes
parent2ba0d2acbd6cb01fb07619628882120d5b66bd59 (diff)
downloadrust-8cb193a5cb694ba62c83fb63a804f22720a118cf.tar.gz
rust-8cb193a5cb694ba62c83fb63a804f22720a118cf.zip
Suggest type param when encountering `_` in fn defs
When encountering `_` type placeholder in fn arguments and return type,
suggest using generic type parameters.
Expand what counts as an inferable return type to slice, array and
tuples of `_`.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0121.stderr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/error-codes/E0121.stderr b/src/test/ui/error-codes/E0121.stderr
index beb8941320b..5da9a4c080f 100644
--- a/src/test/ui/error-codes/E0121.stderr
+++ b/src/test/ui/error-codes/E0121.stderr
@@ -5,7 +5,7 @@ LL | fn foo() -> _ { 5 }
    |             ^
    |             |
    |             not allowed in type signatures
-   |             help: replace `_` with the correct return type: `i32`
+   |             help: replace this with the correct return type: `i32`
 
 error[E0121]: the type placeholder `_` is not allowed within types on item signatures
   --> $DIR/E0121.rs:3:13